What can you use to get an application to be able to receive SMS message?

前端 未结 11 1647
醉话见心
醉话见心 2021-01-31 06:01
  • Do you need to use some kind of provider?
  • Can you setup your own SMS server?
  • Does any open source solutions exist?

I am an SMS newbie so

11条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-31 06:28

    You might take a look at Gammu if you're running on a Linux box:

    http://www.gammu.org

    Using Gammu, you can configure it to periodically poll a mobile phone for new SMS messages. When Gammu finds new messages, it can store them in an SQL database. You can then write another program to periodically poll the database and take action on new messages.

    Using this general setup I successfully deployed a homemade 2-way SMS application. I configured Gammu to pull messages off of the phone over Bluetooth. Gammu placed them in a MySQL database, which I had a Tomcat web application periodically poll for new messages. When a new message was found, the system processed the message.

    This is a somewhat "duct-tape and bailing wire" setup, but it worked quite well and was more reliable than many of the "professional" SMS gateways I tested beforehand. YMMV.

提交回复
热议问题