> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Sending an SMS from FreeSWITCH XML dialplan In order to send an SMS from a FreeSWITCH dialplan extension, we need to do a few things: 1. Fill out the **space\_name**, **project\_key**, **api\_token**, **signalwire\_number**, and **cellphone** channel variables. 2. Substitute all the spaces in the **sms\_body** for the url encoded equivalent of %20:\ `sms_body=${system(printf 'aleg ${uuid} is calling bleg ${bleg_uuid}' | sed -r 's/ /%20/g')}` 3. Calculate the base64 equivalent of your authorization credentials so **auth** is properly setup for curl header **append\_headers** `Authorization:'basic ${auth}'`: `auth=${system(printf '${project_key}:${api_token}' | base64 --wrap 0)` 4. Then, you have the Dialplan Extension. Dial 792 from any registered sip phone, or from bash do: **fs\_cli -x 'originate loopback/792 echo inline'**. Then, your cellphone should receive a text. Review the comments in the extension for additional notes. ```xml ``` From this example, your cellphone should receive an SMS that looks like this: `​​​​​​​aleg 0739c067-c8b3-4a1d-bc8d-76f4a7e71c55 is calling bleg 426cd62b-fbcf-4fb2-a10a-9226dff5ac5d`