× Questions about VS-GW2120/GW1600/GW1202 and WGW1002G GSM Series VoIP Gateway

[solved] How to Install a Modification to /my_tools/lua/sms_receive/sms_recv

6 months 2 weeks ago - 6 months 5 days ago #11703 by 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.

Please let me know how i can modify the file.

Best Regards,

File Attachment:

File Name: mod.zip
File Size:5 KB
6 months 5 days ago - 6 months 5 days ago #11713 by max
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

all the modified files see attachment.

File Attachment:

File Name: smstomulti...1-13.zip
File Size:8 KB
Time to create page: 0.021 seconds
Powered by Kunena Forum