How to send SMS via AT-CHAT

Yes, I’m aware of possible SIM sent messages storage issue: http://forum.mikrotik.com/t/cant-send-sms-with-mbim-memory-full/174068/1

Creating script to send messages in text mode would much simpler, just conversion from UTF8 to UCS-2 encoding if message content is loaded from text file since it is not possible to input non ASCII in ROS CLI, but to craft PDU from script to send in PDU mode to support UTF8 is much more challenge, here is my script for example which I’m using for reading SMS from PDU:
sms-read.rsc (33.9 KB)
There is a lot of code to decode PDU, and PDU for outbound SMS is different so it cannot be fully reused, but since I actually don’t need sending I never tried to make such script for SMS send.