Message parser for Asterisk - MASTERIX
This plugin is for VoIP Asterisk messaging system.
I have been struggling with storing each data.
Original sms data is like so in extensions.conf ->
${MESSAGE(from)} ${MESSAGE(to)} ${MESSAGE(body)}
- ####### variable ############## output ################### we want
- #######
${MESSAGE(from)}
####sip:6464852453@192.168.1.12
##6464852453
- #######
${MESSAGE(to)}
######<sip:6464852453@75.9.113.29>
##6464852453
- #######
${MESSAGE(body)}
####+37126156072 \n Example Message
########+37126156072 AND Example Message
-
Put masterix.py into /var/lib/asterisk/agi-bin/
-
Install dependencies for python:
pip install pyCLI
-
Change in masterix.py sever http URL to which send the data
http://example.com/sms/{{from}}/{{to}}/{{message}}
extensions.conf
[example-contest] _xx.,1,AGI(masterix.py, -f '${MESSAGE(from)}', -t '${MESSAGE(to)}', -b '${MESSAGE(body)}')
For using this app as Command Line Interface take the masterix and put it into /bin directory