SMS sending is fully dependent on your SMS provider.
Mine, for example, has an HTTP API which accepts the sender, recipient, and the message as URI parameters. Then I wrote a small Shell script, and execute it with the "system" application directly from FreeSWITCH dial plan.