1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Send SMS Messages with VoIP.ms 2016-11-3 UPDATE

This tutorial will show you how to send SMS messages from PIAF CLI using VoIP.ms.

  1. wardmundy
    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).

    [​IMG]

    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:

    [​IMG]

    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.
    [​IMG]

    Installation:

    1. 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
    
    2. 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 currently free. VoIP.ms has indicated that there will be a penny a message fee beginning probably in July, 2014. Still free as of Dec. 28, 2014.