Programmable Voice

  1. Home
  2. Docs
  3. Programmable Voice
  4. Mobile Elements Client
  5. Receiving Inbound Calls with Mobile Elements on UWP Device

Receiving Inbound Calls with Mobile Elements on UWP Device

Mobile Elements is a VoIP mobile application which runs on Android, iOS and Universal Windows platforms. This application has been built using Xamarin forms cross platform development environment which is a built-in feature in Visual Studio. The Mobile Elements application supports outbound and inbound calling facility using the Voice Elements server platform and a wifi connection.

Setting up your UWP Device to Receive Inbound Calls

You need to configure your project in the Microsoft developer account for Windows Notification Service.

WNS Configuration with Microsoft Developer Account

Mobile Elements - Windows Service

  • Select Create a new app.

Mobile Elements - Windows Service New

  • Create a Product Name.

Mobile Elements - Windows Service Create

  • After your app is created, select View App Identity details under the the AppManagement Sub heading.

Mobile Elements - Windows Service App Mgmt

  • This information will assist you in linking your application to the Windows Play Store.

Mobile Elements - Windows Service App Identity

  • After you setup your application, you need to sign into visual studio with your Microsoft id. Open the solution and right click on the project. Select Store -> Associate App With Store. Here you can select your app from the store and automatically create an association between your application and the store. The following screenshot will assist you.

Mobile Elements - Windows Service App Store

Making an Inbound Call

  • UWP applications use Windows Notification Service to deliver remote push notifications. The client application requests for a channel URI from the WNS during the launch of application and sends it to the server application for future communication. When an inbound call reaches our Voice Elements server application, then the server sends a push notification through WNS services. WNS sends these messages to the intended device.
  • When the notification arrives at the end device, the Mobile Elements pops a screen to answer/reject the call.
  • Right click on the MobileElements.UWP(Universal Windows) and click on the Properties. Then select the Build tab and set the ENABLE_REGISTRATION in Conditional compilation symbols. This flag will enable inbound call feature in the application.

Mobile Elements - Inbound Call Build

  • Now open the Package.appxmanifest from your UWP project and go to the Packaging tab. Set your Package name and Publisher display name which you must have received during the configuration of your project with the Microsoft Developer Account.

Mobile Elements - Inbound Call Packaging

  • Open the UserCredentials.cs file and set the URI and host of your server in order to connect through the web socket. You also need to set the URI and host of your server application in order to send your channel URI through the web socket.
  • Now you are all set to place an inbound call to your device through GCM push notifications.
Was this article helpful to you? Yes 14 No