3 weeks 17 hours ago - 1 week 3 days ago#11703by max
I use a WGW1002G and recieve sms on two ports and forward them to email. Due to a requirement I want to send all messages from port 1 to the first emailaddress and all messages from port 2 to the second email address. I did some debugging and found the place in the code where this is triggered and did some modification. Now i want to change the file /my_tools/lua/sms_receive/sms_recv with the file in the attachment.
I managed to find a workaround, partly with info from the support ....
here the basic steps:
Because /my_tools/lua/sms_receive/sms_recv is in read-only partition, we can't modify it.
Maybe you can try the solution below:
1). Login your gsm gateway with ssh
2). Upload the modified script to /etc/asterisk/gw/ with winscp
3). Modify the file permissions
Add a command to modify the permissions of the script in /etc/asterisk/gw/custom.sh
4). Wait 5 sek (until original process is started, /bin/sleep 5), Kill the default sms_recv process and start the modified sms_recv process.
Add one command to kill the default sms_recv process. And add another command to start the modified sms_recv process.
Both the 2 command should be added in /etc/asterisk/gw/custom.sh
4). Execute command "/my_tools/sync2flash"
5). Reboot your gateway