Pre-requisites:
---------------

a) Asterisk installed.

This has only been tested on Asterisk 1.0.5, its a very simple addition so it probably works on other versions.


Bayham fast-sms installation:
-----------------------------
Download asterisk-fastsmsapp-1.00.tar

Unpack the tar-file. It will untar into a directory called asterisk-fastsmsapp-1.00.

Copy 'app_fastsms.c' into asterisk-1.0.5/apps

Manually alter the Makefile in asterisk-1.0.5/apps
as follows:-

Near the start of the file is a line that starts with 'APPS='
This lists all of the apps that will be installed.
Add 'app_fastsms.so' at the end of the list.

Near the end of the file, you will see a line like 'ifneq ($(wildcard) .depend),)'
Just before that line insert the following 2 lines.
Make sure theres a blank line before and after the lines you add.
The space before $(CC) is significant and must be a 'tab' character.


app_fastsms.so: app_fastsms.o
    $(CC) $(SOLINK) -o $@ $< -lcurl


Go to the asterisk-1.0.5 directory and do 'make' and 'make install'


Copy 'fastsms.conf' into /etc/asterisk
Edit 'fastsms.conf' and set the companyid,userid and password values.

The values required are supplied by Bayham Systems, you can see them by logging in
at https://secure.bayhamsystems.com/asterisk/main.php
On the 'Account Summary' page you will see a section called 'Installations'.
Set companyid= to the Company Id value
Set userid= to the Installation Id value
Set password= to the Password value

Add rules to extension definitions to use the new app. (See example below)

Start asterisk

Test it !



Example

exten => s,2,FastSMS(44123456789|Hello World)

or

exten => s,2,FastSMS(44123456789|Hello World|Bayham)

The parameters supplied to the module are as follows:

Destination (Required):
The number to which the SMS message should be sent. The country code must be included here for the message to be accepted.

Message Text (Required):
The text of the SMS to be sent. This is currently limited to 160 characters and any message longer than this limit will be truncated.

Sender Id. (Optional)
The identity of the sender, this is limited to 11 chars.  If you set it to a number the receiving mobile will use that as the reply to number.




The message waiting indicators (as defined in GSM) on the mobile phone can also be controlled by sending the following values in the text field.

MWIVOICEMAILON
MWIVOICEMAILOFF
MWIFAXON
MWIFAXOFF
MWIEMAILON
MWIEMAILOFF
MWIOTHERON
MWIOTHEROFF

There is often no way for the mobile user to switch off these indicators, so if you switch one on, please be polite and switch it off again at an appropriate point.


The FASTSMS module will log any problems in the verbose log of asterisk.

Support is avaiable via email, support@bayhamsystems.com
