My business has comcast voip phone that enables different phones in the office to send/receive phone calls. The computers are connected with the internet provided by comcast as well. For the front desktop computer, I want window to pop when the phone rings due to customer calling. Before window pops up, the application would recognize the phone number of the caller, query the database, extract the data , populate the pop up window with customer data. So the front desk person has the customer information when the phone rings before the phone is picked up. I want to be able to program this window pop up in c#, .net.
How can this application be created? What sorts of technology in twilio will handle that? How can window up be between the desktop and the phone? How do I go about prorgramming this kind of app? Is this possible to achieve keeping Comcast phone serivce and current phone numbers for clinics in place with out any disturbance?
Thanks.
Twilio Evangelist here.
To be sure I understand, you want the popup ('Screen Pop') to show on the computer when or before the phone rings? You can achieve this by using the <Dial>
verb and <Sip>
in your TwiML to route the call, and some server side code to push the screen pop to the user.
The way I would go about this is to build a C# web application (MVC is a good way to go) that is in charge of routing my calls. It has two key rolls:
To handle the incoming calls, you need to get a number form Twilio, and point it at the URL of your C# web application. When a call is made to your Twilio number, Twilio will make a request to your applications URL with some data about the call. The From
parameter is most important here, as we can use that to query your database for the customer's information.
Once we have that data, you need to create a screen pop. If your users have a web page open all the time, you can use a JavaScript library such as Pusher, or Socket.IO to create the screen pop. If you have a C# application on the desktop, or system tray, you can use that to display a notification. It really depends what your users are doing with their screens. In Pusher, using their C# helper:
var result = pusher.Trigger( "incoming", "call", new { customer_name = "Fred Blogs" /* etc */ } );
Now, once you've sent that notification to whatever system you want to notify the user with, you need to direct the call to the users phone. Your web application now needs to respond to Twilio with some TwiML (XML) telling Twilio how to handle the call. You will need to setup SIP with Twilio so it knows how to talk to your phones, then it's a simple matter of directing the call:
<Response>
<Dial>
<Sip>sip:[email protected]</Sip>
</Dial>
</Response>
Full documentation on <Sip>
is available on Twilio's website.
There is a Twilio blog post on Building Screen Pops with Twilio Client and FullContact API. This is written in NodeJS and users Twilio Client instead of a physical VOIP phone, but it should give you a good idea of implementing the above. There is more information about using the Twilio C# Helper Library, and a good quick start for getting up and running with C#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With