afaik, the only log output for SMS stuff is by using fs_cli.
Try the following revised lua, I added a few missing quotes, and also have the curl command append it's result into the /tmp/sms.send.log file.
Code:
cmd = "curl '" .. api_url .. "' -H \"Content-Type: 'application/xml; charset=utf-8'\" '<?xml version=\"1.0\" encoding=\"UTF-8\"?> <sms><user><username>".. username .."</username><password>".. secret_key .. "</password></user><source>test</source><destinations><phone>".. to .."</phone></destinations><message>".. body .."</message><response>0</response></sms>' | tee -a /tmp/sms.send.log";