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.01.tar

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

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 !

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

The parameters supplied to the module are as follows:

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

messageText (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, must be supplied if MWI is used)
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.

Message Waiting Indicator (Optional)
Set/clear a message waiting indicator on the mobile phone.  Values are as follows

 1 = VoiceMail On
 2 = VoiceMail Off
 3 = Fax On
 4 = Fax Off
 5 = Email On
 6 = Email Off
 7 = Other On
 8 = Other Off




Text Message Examples

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

or

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

or

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


Setting/clearing Message Waiting Indicators on Mobile phones

To set the voicemail indicator

exten => s,2,FastSMS(44123456789||441483123123|1)

To clear the voicemail indicator

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


Important Note: What actually happens when you set/clear these indicators is phone model dependent.
For example some phones switch off indicators silently, theres no sign the message has been received
other than the icon disappearing.  Other phones play the 'text arrived' ringtone and display a message.
If you set the voicemail on indicator, older phones will prompt the user to call their operators voicemail system.
But some newer phones will prompt the user to call the number supplied with the indication message, which is
obviously more useful for asterisk users.

You can supply text for the MWI message, but some/most? phones ignore it.


Support is avaiable via email, support@bayhamsystems.com
