Start Teams call from c# - c#

I'm looking for a way to start a Teams call from within my own custom application.
Our application has a whole bunch of phone numbers for Customers/Suppliers/... and I want to give my users the option to initiate a call just by clicking a button in the application.
Does anybody have a good sample on how to do this?
I know that in the past, this was fairly easy to do with Skype and Lync. They just had an SDK you could call from your own application.
But when I try to look for the same thing in Teams I always end up in documentation around bots. And it's a bit confusing if you're new to that part :-)
So main question is, how can I start a phone call with Teams from my own code? Phone calls to an actual phone number, not a Teams account.

There's no such API available to create a call. However you can have deep link to make a call. Follow this doc to understand Deep linking to an audio or audio-video call
To make a call to combination of VoIP and PSTN users https://teams.microsoft.com/l/call/0/0?users=<user1>,4:<phonenumber>
To make an audio call you can do -
https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>
To make a video call you can do - https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>&withVideo=true
User ID field supports the Azure AD UserPrincipalName, typically an email address, or in case of a PSTN call, it supports a pstn mri 4:.
It will not directly going to start the call. Instead showing a pop-up as below -

Related

How to get the Caller Info from VoIP in real-time in a .NET Application?

I am working on a project which includes a lot of VoIP functions. I don't have access to the source code of the previous system that was being used so I can't dissect it to find out what I need to know. I will describe how the previous system used to work and then ask my question.
First, the old system that we have been using depends on Physical Phones which receive calls over the internet. There is a Desktop App installed on our computer which somehow takes the phone call received by the phone and shows that phone number on the Desktop App. Which uses that number to look up data about the caller. But the problem is that this Desktop App is over a decade old and has not been updated since. So we want to build a new Web Based Application with .NET that will do the same. My question is:
1- How do I fetch the Caller Information From the Physical Phone and use it how I want? The phone being used is SNOM 760 but its possible that other brands or models be used in the future.
2- Let's say that a specific page is always opened on the browser. How do I transfer the caller number to the server and then show a pop up with the information about the caller in that page that's always opened in the browser in a RELIABLE way? What about when that specific page is not opened? Remember that the phone that is receiving this call is not directly in communication with the server. But that is also not a restriction. I read somewhere while researching that I could have my server take the call first and then transfer it to that physical phone. The only restriction is that we use VoIP phones/numbers.
Like I said, I have very vague information on the subject. Any help is appreciated. I've studied that I could use Twillio or other such third party services to achieve this task but I just wanted to know if I can do it myself instead of relying on someone else and hoping they don't shut down their services in the next few years.
Those are a lot of questions jammed into 1 there, I'll try to answer some.
As you already tagged it, TAPI is an option but not very easy to get into. TAPI normally get it's information centrally from the PBX, but in your particular case the SNOM system has the phones themselves connect to a central server to gather the information and distribute it there. You may be able to hook into a proprietary protocol.
Gathering calls on a central server to then distribute them to phones is usually done with an IVR (Interactive voice response). Channeling outside calls through it is easy but the problem with getting your call information from this point is usually you miss the internal calls.
Your website pop-up is not my area of expertise, maybe someone else could comment on the feasibility of that, but personally I would go with a task-tray style app if reliability is your highest priority.

How can I hide the API calls that a c# app makes?

I want to hide Api calls which is used in my c# program from the programs like API Monitor. (Windows)
whether packers can do this?
I search about this alot but i cant find any thing that can help .
Thanks in advance .
Probably the only thing that will hide this sort of thing is an obfuscator...
You basically bake VPN code into your app.
Make a connection to anywhere in your country, perhaps a list that your code picks one at random each time the app is loaded.
Then when the app makes the calls there all encrypted by the vpn.
For a website you can use Azure or AWS with something like Cloudflare.

Windows Mobile - Attach on call starting and recording a call

I need to implement a small feature in my project for windows mobile 6.0+ platform. I want to attach to an event when a phone call is answered and to record the 2 way call. I saw this question:
Windows Mobile - 2 Way Call Recording (C#)
But it doesn't work in my case. When I start to record the microphone is blocked and the person on the other side can't hear my voice. I thought that maybe the problem is in the telephone(HTC Touch HD) but there are some programs that work, for example:
http://www.1800pocketpc.com/record-phone-calls-on-windows-mobile-htc-touch-hd/2925/
http://forum.xda-developers.com/showthread.php?t=536472
I have two questions:
How to attach to a phone call?
How to record the phone call?
I appreciate your help.
Thanks,
Ivo
It's not possible. This is by design. It's illegal to record a call without informing the other party involved. Same is the case with iPhone. Though there are services where you call and they call other party and record the conversation, but that's server side.
Check this out. According to the posts in the link below there is a hardware limitation preventing this ability in an application.
http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesnative/thread/65897b3b-da11-458b-b191-b9e4f6825843/

how to start with windows API in .net

I want to work on windows API. I have an interest in creating network application that can communicate with web as well. I haven't thought any application yet. But before doing all this . I want to know where to start with. What all I need to start reading.
I have created lot of database interactive applications with window forms. But would like to start with this.
If you want to use Windows API methods from .Net, you'll need to use PInvoke to call them. There's a site called pinvoke.net that has samples for how you call many of the APIs so if you know which API you want to call, that's usually the best place to start.
For your use case maybe you dont need API at all. You could use the FileSystemWatcher .net class to react on any changes in a log folder e.g. It reacts on modify/add/delete of files.

Using data from Google Maps in a C# Program for Windows Mobile

I'm making a charity Windows Mobile 6 app in C# to help those affected by Alzheimer's.
The aim is for this app to let the carer set a boundary by tapping in Google maps to set points. The carer would then put the windows mobile device in the patient's hand bag or coat, so that when the patient walks out on their own, thinking that they are "going home", the carer receives an SMS text with their position, heading and speed.
However, I don't know how to...
Switch from app to google maps for mobile
tap to select points
import the coordinates of that point to my C# program
use the coordinates to Calculate the boundary
Send the text with the position information
Switch back to my C# program
HTC's HD2 comes with a compass that uses this "tap to select a point then return to app" functionality, so surely it's possible for us too?
If anyone would be able to give me a hand my out I would be EXTREMELY grateful as this will help all those affected by Alzheimer's and other similar conditions. My Gran, for example, recently started trying to walk back to the property she lived in 20 years ago...
Thanks everyone! This means sooo much! I'll even come and buy you a drink to say thanks!
James
Whatever technical issues you're considering, I think you should realize that this type of usage is, AFAICS, contrary to the terms of service of google maps. See:
http://code.google.com/apis/maps/terms.html
That is, you may only use the google maps content if its accessible for everybody, not just whomever you hand out your program to:
Your Maps API Implementation must be generally accessible to users without charge.
If you're building it as a web app, it must be accessible through the internet, not intranet:
[your Maps API Implementation must not:] operate only behind a firewall or only on an internal network (except during the development and testing phase).
Some of the terms in header 10 also seem applicable:
[you must not (nor may you permit anyone else to):]
10.8 use the Static Maps API other than in an implementation in a web browser;
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user's sensor-enabled device;
Why would you want to kludge something together like that? Trying to have your app interface with another application for which you don't have source, whether it's Google Maps fopr Mobile or anything else, is difficult and should only be used as a last resort.
If this app is going to be free and not require users to log in, you can use the Bing Maps Web Service API directly from your application without cost. You could then use built-in GPS through the GPSID APIs as well, and you'd have control over what data goes where, what maps to draw, etc.
This seems like a much easier path to achieve what you're after.
As a side note, I gave a link above for the GPSID sample from Microsoft. I'd recommend looking at it and the native GPSID APIs but the managed wrapper Microsoft provided is, IMO, pure garbage, so you might consider wrapping the lower APIs yourself.
To restate the problem I believe you're trying to solve:
You've a use case when a carer will sent up a "virtual boundary" on a device. If that device leaves the bounded area, you'd like an alert sent via SMS sent to a predefined recipient, saying where that device is.
My suggestion would be to use something like OpenStreetMap maps (as they're free) for when you're setting up the virtual boundary. For their tiles (each 256px square), there is a relatively trivial method for converting between lat/long and pixel co-ordinates.
You might also be able to do what you want by cannibalising one of their existing Windows Mobile applications intended for surveying, such as OSMtracker, which already includes the map controls, downloads and the like, just leaving point 5 and part of point 4 on your list to tackle.

Categories

Resources