Git Codebase - Sn0wlink IT
SMS AAISP Command Line

Code: Download ZIP


README

SMS AAISP Command Line Tool

A simple Bash script for sending SMS text messages via the Andrews & Arnold (AAISP) SMS gateway.

It uses curl to POST messages to https://sms.aa.net.uk/sms.cgi, allowing you to send SMS messages from the command line or from scripts/cron jobs.


Requirements


Installation

  1. Save the script as sms-aaisp
  2. Install it into your personal bin directory:
mkdir -p ~/bin
mv sms-aaisp ~/bin/
chmod +x ~/bin/sms-aaisp
  1. Ensure ~/bin is in your PATH (usually already is on modern Debian) If not, add this to ~/.profile or ~/.bashrc:
    export PATH="$HOME/bin:$PATH"

Log out and back in (or reload your shell) after changing PATH.


Configuration

Edit the script and set your AAISP credentials:

AAISP_USERNAME="+441234567890"
AAISP_PASSWORD="your_api_password_here"
AAISP_URL="https://sms.aa.net.uk/sms.cgi"

Notes


Script Behaviour

Example output:

Message Sent

Usage

sms-aaisp <destination_number> "<message text>"

Example

sms-aaisp 07123456789 "This is a test SMS."

Numbers should normally be supplied in UK national format (as expected by AAISP).

Script Behaviour

Example output:

Message Sent

Error Handling

This script does not currently parse or validate server responses.
If you need robust error handling:


Security Considerations


References