3 wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | s
h;
4 cd /usr/src/fusionpbx-install.sh/debian && ./install.sh
5 cd /usr/src
6 ls
7 git clone https://github.com/fusionpbx/fusionpbx-apps
8 ifconfig
9 cd fusionpbx-apps/
10 cp -R sms /var/www/fusionpbx/app/
11 cd /var/www/fusionpbx/app/scripts/resources/scripts/app
14 ln -s /var/www/fusionpbx/app/sms/resources/install/scripts/app/sms
48 vi /etc/fusionpbx/config.conf
81 vi /usr/share/freeswitch/scripts/app/sms/index.lua
93 vi usr/share/freeswitch/scripts/app/sms/index.lua
94 vi /usr/share/freeswitch/scripts/app/sms/index.lua
102 vi --version
# change vi config mouse
104 vi /usr/share/vim/vim82/defaults.vim
106 vi /usr/share/freeswitch/scripts/app/sms/index.lua
install xml editor, edit chatplan
216 locate chatplan
217 ls -l /var/www/fusionpbx/app/sms/resources/templates/conf/chatplan
for outbound sms, need to copy/paste chatplan by xml-editor from above file
test lua code in cli, the code must in the following directory
root@fusionpbx:/usr/share/freeswitch/scripts/app/sms# more /usr/share/freeswitch/scripts/test.lua
outbound_caller_id_number = "1201xxxxxxx"
to = "1514xxxxxx"
body = "haha"
api_url = "https://portal.bulkvs.com/api/v1.0/messageSend"
cmd = "curl -X POST '" .. api_url .."' -H \"accept: application/json\" -H \"Conten
t-Type: application/json\" -H \"Authorization: Basic amFjb2J2b2lwaXQ6ZGY4ZGY5xxxxxxx=\
" -d '{\"From\": \"+" .. outbound_caller_id_number .. "\", \"To\": [\"+" .. to .. "\"], \"Message\": \"" .. body .
. "\"}'"
freeswitch.consoleLog("INFO",cmd)
----
freeswitch@fusionpbx> lua test.lua
-ERR no reply
2023-06-29 12:54:43.038015 98.37% [INFO] switch_cpp.cpp:1465 curl -X..
"Message": "haha"}'
new git sms module include bulkvs carrier now