Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CallController.cs 932 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  1. namespace EmergencyServicesBot
  2. {
  3. using System.Net.Http;
  4. using System.Threading.Tasks;
  5. using System.Web.Http;
  6. using Microsoft.Bot.Builder.Calling;
  7. using Microsoft.Bot.Connector;
  8. [BotAuthentication]
  9. [RoutePrefix("api/calling")]
  10. public class CallingController : ApiController
  11. {
  12. public CallingController() : base()
  13. {
  14. CallingConversation.RegisterCallingBot(callingBotService => new IVRBot(callingBotService));
  15. }
  16. [Route("callback")]
  17. public async Task<HttpResponseMessage> ProcessCallingEventAsync()
  18. {
  19. return await CallingConversation.SendAsync(this.Request, CallRequestType.CallingEvent);
  20. }
  21. [Route("call")]
  22. public async Task<HttpResponseMessage> ProcessIncomingCallAsync()
  23. {
  24. return await CallingConversation.SendAsync(this.Request, CallRequestType.IncomingCall);
  25. }
  26. }
  27. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...