Search code examples
javascriptphptelephony

How to get Phone Calls start and end details in php or javascript for telemarketing application


Hello this is very unique question... we have requirement for web app which has some features related to phone... Like We want to make calls to customer via our computer (webapp in browser).. and computer can be connected to simple mobile phone or other thing and we have to insert details of call start and call end with customer details in our databse....
Anyway to achive this in php/javascript or any other way to achieve this type of thing or thing similar to it.. Or any alternative to achieve same type of thing in some other way ....

We need to store details in Database

Yes i know about twillow.com ... but if any open source technology then it will be awesme..


Solution

  • Well there is a couple of ways of doing this. There is first no way of getting PHP to call up without a SIP server or something like that. You can of course get a local SIP Server that has an API that can be used to call out and if we should help you with setting that up then this post would be very long.

    Look into Asterisk or a already made service with api like twilio or a local provider depending on where you stay. I know that Grandstream and some other providers have small SIP servers that is really easy to setup. For me I use Twilio but sure it cost some more per minute but it will give you peace of mind.

    However on getting the call data that has been made then if we for instance use twilio then you store the call id and then request it for length after 30 min or even 15 minutes and scans all calls for the duration.

    Check the: https://www.twilio.com/voice/api

    If you want to save some money and have SIP connection then I would use the https://www.twilio.com/docs/api/rest/making-calls-sip to use Twilio SIP.

    In one of my companies they are using a provider that has an API to get the call logs. One thing you should look into.

    Hope this answer helps you in the quest.