Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Thanked 0 Times in 0 Posts

    How to create a voice call application in PHP?

    I want to know how can make internal live voice calling application in web site using PHP, not calling to external phone network and not by phone number - just by username in site?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Your Monitor
    Thanked 506 Times in 493 Posts
    Well in reality you can't - not easily. PHP isn't really ideal for that. Yes it can in theory be done but not easily.

    For a start you'd need to be on a dedicated server or VPS not a shared account. Then you'd need to run a script in a loop indefinately that can fork multiple processes with sockets which can then accept an incoming voice stream and output it to another connection.

    How you do the client end (flash, activeX, downloadable app) is open to discussion. To be honest, you'd be far better making your voice server to run as a service on windows or a linux process rather than try to use php.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #3
    Regular Coder
    Join Date
    Aug 2012
    Thanked 3 Times in 3 Posts
    putting tel: in the html tag instead of mail to causes your browser to dial the numbered entered. If you have something like skype on the desktop then this will work on a computer. It will also work on a mobile device like a smart phone or tablet.

    <a href="tel:1-408-555-5555">1-408-555-5555</a>
    To fix errors if you have no voip client installed on a desktop or laptop add this script:

    if (!jQuery.browser.mobile) {
        jQuery('body').on('click', 'a[href^="tel:"]', function() {
                    jQuery(this).attr('href').replace(/^tel:/, 'callto:'));
    Now all you have to do is load phone numbers in your table in the right format so they look exactly like the example and then your PHP would look like this (connection assumed):
    PHP Code:
    <php echo '<a href="tel:'$row_myTelephoneRecords['phoneNumber'], '">1-408-555-5555</a>' ?> 

  • #4
    New Coder
    Join Date
    Sep 2013
    Thanked 1 Time in 1 Post
    Try out with this one:

    You can use asterisk and implement an IVR flow using AGI php scripts.

    Asterisk is an open source telephony project. You install the software on a linux box, then you connect some phone lines.

    Hope this helps.


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts