Establish & Receive Calls via a GSM modem in PHP

后端 未结 1 1881
我寻月下人不归
我寻月下人不归 2021-01-14 15:28

I am having a CRM (Customer Relationship Management Software) built on php and running it on localhost (windows XP system). This contains the list of my clients. I want to b

相关标签:
1条回答
  • 2021-01-14 16:27

    I wouldn't try to do this with pure PHP since then you would have to have PHP interface with the hardware through the webserver, which can be a pain, if it is manageable at all. There are (edit) three options in my view:

    1: AKA the hard way:
    Write a PHP extension in C that does what you want, but this would mean a lot of programming for a relative small task.

    2: The eas[y/ier] way:
    Find a program (Maybe Skype?) that can do voice communication with your modem and has an API or a CLI so you can make PHP run:
    voiceprogram.exe --call=555-000-5555 --saveTo=client1_20113103_1200.mp3
    This allows the application to do what it's good as and only use PHP as the controller. The resulting MP3 (or Wav, OGG, etc) can be saved back to the CRM.

    3: Other options
    If you are able to program in a different language that does communicate easily with your modem you can write some custom code that can be triggered by PHP (sockets/SOAP/CLI) and handles the call. When finished it can 'POST' the call information back to your PHP script.

    The first 2 solutions only work when the CRM runs on localhost, if you plan on using this in a shared network environment complexity will go up. The last option, if done correctly, can be used in a shared environment.

    0 讨论(0)
提交回复
热议问题