Download the following System requirements
* Note: if you do not install the above requirements the installation will fail
1. Download the latest Dahdi sources from asterisk.org:
2. Untar and install dahdi
|tar xfz dahdi-linux-complete-220.127.116.11+18.104.22.168.tar.gz
make && make install
1. Download the latest LibWAT:
2. Untar & Compile & Install
|tar xfz libwat-1.0-current.tgz
Asterisk LibWAT Patching
Currently, libwat requires a patched version of Asterisk to work. Libwat Asterisk patches can be found in the libwat-X.X.X/asterisk directory.
You will need autoconf 2.60 or later to be able to patch Asterisk.
Copy patches to asterisk source directory. Make sure to use the patch version that matches your version of asterisk:
cp asterisk-<your specific asterisk patch> /usr/src/asterisk-<verison>
To patch your Asterisk Installation:
patch -p 1 < asterisk-<version>.patch
Re-configure and re-compile your Asterisk:
Use the wancfg_dahdi script to generate your configuration files
Sending and Receiving SMS with Asterisk
Sending SMS using Asterisk CLI
|wat send sms <span> <number> <message>|
|CLI> wat send sms 1 6474024628 "Hello World"|
Receiving SMS using Asterisk CLI
When a SMS is received, it will printed in the Asterisk CLI and the logs.
|-- Span 1: SMS received Hello World|
It is recommended to enable Asterisk full debugging while the LibWAT library is still in beta phase to facilitate debugging.
Enable debug configuration in chan_dahdi.conf
In chan_dahdi.conf in the Channel section create a variable called:
Below are the possible options to use for wat_debug:
For example: wat_debug=all
any combination of the above separated by commas will work.
Most of the time I'd stick to "all" when debugging a problem and only use the others if you've been asked to.
You can also enable UART (serial interface) debugging to see which AT commands are sent and received at the driver level:
|wanpipemon -i w1g1 -c gude|
All UART communications will be dumped to the driver logs (ie: /var/log/messages)
To disable UART debugging:
|wanpipemon -i w1g1 -c gudd|
(gude - GSM uart debug enable)
(gudd - GSM uart debug disable)
1. Confirm that SIM cards are inserted
Devices currently active:
Device name | Protocol | Station | Status | Wanpipe | Lapb | X25 Link | X25 Svc | Dsp |
GSM modules that do not have a SIM card connected will have status: Disconnected
2. Checking network registration
From the Asterisk CLI:
|CLI> wat show spans|
|WAT span 1: Up ("+16472673394")
WAT span 2: Down
WAT span 3: Down
WAT span 4: Down
Devices that have registered to the network successfully, will have status: Up. If the subscriber number (own number) is available, it will be displayed beside that span ("+16472673394" in our case).
3. Checking Signal Quality
From the Asterisk CLI:
|CLI> wat show span 1|
Signal strength: (-77)dBm
Subscriber: "+16472673394" type:1 plan:1 <"TELEPHONE">
Manufacturer Name: GC864-QUAD-V2
1. It is recommended to have a signal strength higher that (-80) dBM (a value between -50 dBM and -80 dBM) to avoid dropped calls.
2. Having a high Signal BER (Bit Error Rate) may affect audio quality.
3. The first time the GSM modules are started in a location, it may take up to 6 minutes for a GSM signal to be detected. This is because the GSM chip is iterating through each of the 4 GSM bands to search for a signal. Once a signal is detected, the band is memorized, and subsequent starts will take only a couple seconds.
3. Enable Asterisk command line debugging
Aside from the driver debugging of the serial line (which sends and receives AT commands, responses and notifications), Asterisk can also print AT debugging information to the screen, which is easier to correlate to call events within Asterisk.
If you have the latest libwat release + Asterisk patch, there is a way to enable debugging from the command line:
CLI> core set verbose 3
Even when wat debugging is enabled, you still have to enable regular Asterisk debugging settings:
sangoma_gsm => notice,warning,error,debug,verbose,dtmf,fax
When changing this file you must either restart asterisk or execute "logger reload". Note that if you restart Asterisk the debugging options (verbose, debug, wat all) enabled thru the command line will be lost. Therefore you want to do the logger.conf changes first.
Please verify the have latest libwat and Asterisk patch, if they do not have it the command "wat debug all" won't be available.