Here's a quick-and-dirty command line script to send SMS messages using a VoIP.ms DID that is SMS-capable and SMS-enabled.
Prerequisites:
1. VoIP.ms account with at least one DID that is SMS-capable (cellphone icon appears beside the DID number).
2. SMS-capable DID has been enabled for SMS use. Also configure SMS messaging with a destination email and/or forwarding SMS number to receive replies from the SMS messages you generate. Click on Manage DIDs in the VoIP.ms portal and then Edit DID:
3. VoIP.ms API has been enabled with a secure password AND the IP address of the server from which you will be sending SMS messages.
Installation:
1. On pre-CentOS7 releases: yum -y install php-soap
2. Download and unzip the tarball from the command line ONLY on your server (the link above is out of date):
3. Edit class.voipms.php and insert your VoIP.ms account name (email address format) and your API password (generated above).
Edit voipms.sms.php and insert the 10-digit SMSsender DID for outbound messages. This must be an SMS-enabled DID on your voip.ms account! It is the number to which replies will be delivered.
Operation:
From the command line, issue the following command including a 10-digit recipient number and an SMS message in quotes.
Cost:
SMS messaging is no longer free. Now it's a penny a message.
Prerequisites:
1. VoIP.ms account with at least one DID that is SMS-capable (cellphone icon appears beside the DID number).
2. SMS-capable DID has been enabled for SMS use. Also configure SMS messaging with a destination email and/or forwarding SMS number to receive replies from the SMS messages you generate. Click on Manage DIDs in the VoIP.ms portal and then Edit DID:
3. VoIP.ms API has been enabled with a secure password AND the IP address of the server from which you will be sending SMS messages.
Installation:
1. On pre-CentOS7 releases: yum -y install php-soap
2. Download and unzip the tarball from the command line ONLY on your server (the link above is out of date):
Code:
wget http://incrediblepbx.com/voipms-SMS.tar.gz
tar zxvf voipms-SMS.tar.gz
3. Edit class.voipms.php and insert your VoIP.ms account name (email address format) and your API password (generated above).
Edit voipms.sms.php and insert the 10-digit SMSsender DID for outbound messages. This must be an SMS-enabled DID on your voip.ms account! It is the number to which replies will be delivered.
Operation:
From the command line, issue the following command including a 10-digit recipient number and an SMS message in quotes.
Code:
./voipms-sms.php 6781234567 "This is a test message."
Cost:
SMS messaging is no longer free. Now it's a penny a message.