Initiate PSTN call from teams to public landline.

Occasional Contributor

Hi all,

This is my first post. I search on this concept thoroughly beforehand. But couldn't seem to find anything

I have looked into the cloud communications part of the MS #GraphApi in order to make a proof of concept regarding:
initiating pstn calls from a 3rd party program through Teams to a public landline.

Looking at examples like:

I would imagine that I might be able to something along the lines:

  1. User1 in company Contoso activates a method in 3rd party program. Which sends a command to a call bot
  2. The call bot initiate a connection to User1 in company Contoso
  3. On reply (preferably automatic)
  4. The bot calls the designated landline from the 3rd party program
  5. When the PSTN call is accepted by UserB in Acme Inc. The call is "merged" and the bot leaves the call.



Is this even doable ? Have someone made something similar. If there is another solution that is easier that is also very much welcome.


Looking much forward to your comments.


8 Replies

@lund76 Could you please check call Transfer. Try if that helps

Hi @Nikitha-MSFT ,
Thank you so much for replying. I can definitely have a look at that. However the issue have matured a bit and I have a more concise explanation of a problem I have run into
I do hope, that calling any public landline ought to be possible, and not only the numbers of users within the same tenant ?! (as the transfer call says initially)

Sorry about that @Nikitha-MSFT
I have updated the link .. For some reason the linked was truncated after posting

@lund76 -Which is to create a bot that can make a group call to a user within the organisation, and add a recipient by PSTN (public user outside the organisation). That way I can have a 3rd party program initiate a call between a teams user and PSTN landline. The bot can then either remove itself from the call or stay and do bot stuff for the teams user :)

@Nikitha-MSFT - Yeah, that was me trying to sum up my intentions :) So far I've not been able to get confirmed, that this scenario is even possible - it should be - but i'm not sure.

Hi @lund76,


I have been grappling with a similar approach for my CRM system and I thought I would give my findings here. The basic use case is to implement Click to dial. Since there is no direct dialing in teams i.e. person A calling Person B the bot approach has been used but the bot presents some problems. I am pretty sure there is a bug somewhere. I don't know as to what stage you have got up to but here is where i am.


My approach is:

Bot calls originator of the call.

Originator answers - this must happen first.

Bot dials participants and adds to the call.



1. I send a request to my webserver registered bot to call between Person A in Contoso and Person B in Contoso (I will come to the PSTN portion later).


2. I see on Person A's teams it says that the bot is calling. If I press decline I get a call established event which of course is wrong (since I declined) but this leads to a problem because I cannot now automatically add the participant to the call once the originator answers. I decline, the recipient will be in limbo (and if this is external i.e. a pstn number could be even worse). There are lots of times you are making a call and get distracted so you end the call before it begins. It is vital that the Person A is on the call before Person B is called.


3. Assuming that you answer the call you will get the same call established event which means that you cannot distinguish between a call answered or declined. To get round this i had to introduce an IVR i.e. press 1 to dial the recipient (hardly slick but cannot do anything else with the event saying established even when it isn't).


4. The recipient then either answers or declines and this can be detected again provided you dial multiple recipients 1 by 1 and add them to the call.


5. I have not been able to get PSTN working and am still working on that but since the bot is calling the recipients i am intrigued as to what number it uses. While setting up PSTN I needed to get a number from Microsoft and assign that to a user say Person A. Since the bot cannot be assigned a number I am curious as to what the recipient sees as the incoming call number and of course this may stop a bot dialing PSTN anyway (still to be checked). 


6. I have confirmed by the help on these forums that direct dialing is not available and have placed as a feature request. i.e. the bot makes the calls but remains silent and invisible so the Person A and Person B think they are the only ones on the call. I also think that unless i am missing anything a declined call should not say established.


I get the feeling that there must be a very simple way of doing this click to dial task in the same way you describe but cannot find anything. It is vital i have the originator of the call answer first before adding participants but I cannot see it working at the moment.


If anyone has any thoughts please let me know.





HI @chafford100
Thank you so much for taking the time to give such a thorough reply. Looks like you've been through quite a lot already.

My main focus have been on getting the bot to call a pstn number, since if that doesn't work - what's the point really :) .. At least in this architecture.

The most promising engagement I have received is on this thread : 
From the comments you can see that MS Engineer (i assume) has been able to reproduce the error.

An interesting development ... maybe ... Is a  tweet from Mike Landis, tweeting about some things starting to work. 

Best regards
Søren Lund