News

Receive SMS with Asterisk

Receive SMS with Asterisk

Asterisk-module Polygator accompanies “Polygator VoIP/GSM-card” (4/8 SIM-cards, PCI/PCIe). Thanks to the module, all features of the Polygator GSM-card are available via Asterisk dialplan or CLI. Among others, there is a feature to receive and process inbound SMS by means of Asterisk and Linux.

 

For example, here are the steps to set up forwarding inbound SMS to external server:

 

1. Prepare a handler (script in php, python, bash…). The script will receive SMS-data from Asterisk and forward data to external server by HTTP-request. Place it on an Asterisk-server in /home/ folder.

 

 2. Configure channel of GSM-card:

 Via Asterisk console or via file polygator.conf specify context and extension for incoming SMS.

 Sample for channel #3 (gsm-3):

 CLI commands:

CLI> polygator channel gsm gsm-3 set sms.ntf.en yes
CLI> polygator channel gsm gsm-3 set sms.ntf.ctx gsm_sms
CLI> polygator channel gsm gsm-3 set sms.ntf.exten sms

 Accordingly, we enable SMS feature - yes, context - gsm_sms, extension - sms.

 

3. Create context and extension in extensions.conf file and specify path to handler script.

 Sample for extensions.conf

 [gsm_sms]

exten => sms,1,Noop()
same = n,System(/usr/bin/php -q /home/test.php '${PGSMSCHANNEL}^${PGSMSDESTADDRESS}^${CALLERID(num)}^get^sms^${PGSMSCONTENT}^in^${STRFTIME(${EPOCH},,%Y:%m:%d-%H:%M:%S)}')

 

Since configuring done, each inbound SMS on channel #3 will trigger Asterisk’s dialplan to execute script at /home/test.php. Command line parameter contains SMS-data fields separated by ^.

 

The way to pass and separate SMS-data fields it totally up to the end-user of GSM-card Polygator.

 

To get more details about prices for various configurations, please, contact us via email This email address is being protected from spambots. You need JavaScript enabled to view it. , skype: polygator or via the contacts on the website www.polygator.com

 

Quick contact


 

Contact Details

POLYGATOR (manufacturer)

This email address is being protected from spambots. You need JavaScript enabled to view it.
www.polygator.com
Skypepolygator

 

Contacts:

UKRAINE
Elgato Communications
+380(56)719-9030 (landline office)
+380(63)797-3020 (mob)

 

Local landlines in

RUSSIA: +7(499)403-3248
UK: +44(203)769-1858
USA: +1(312)3-400-898

Compatibility Short-list

Native drivers Certified with Tested with Technologies
Asterisk
(PCI GSM Interface Card for 4/8 SIM-cards)

Elastix

SoftSwitch, IP-PBX
Asterisk
3CX
Oktell

VoIP Billing
MVTS
A2Billing
MOR

SMS software
Diafaan
Kannel
Ozeki
ActivExperts
SMS.Gate

GSM UMTS PRI(E1) SMS

SIP

Codecs
G.729 G.711 G.723 G.726 DTMF

SMS protocols
SMPP SMTP AT-commands SMS-via-SQLLite (Under Asterisk)

Website by wwsiter