[[!meta title="Using SZS (the SMS to Zephyr Relay)"]] ## Introduction to SZS, the SMS to Zephyr Relay This service relays messages between Zephyr and phones (which use SMS). In other words, you can send and receive text messages in Zephyr. For the short version of this documentation, see [http://webzephyr.mit.edu/szs.html](http://webzephyr.mit.edu/szs.html). ## Zephyr to SMS To send zephyrs to a phone address as an Athena user, use your favorite zephyr client to zwrite `daemon.webzephyr` with a class of `szs` and an instance of `1234567890@servicemail.foo`; for instance, in Barnowl, ----> zwrite daemon.webzephyr -c szs -i 1234567890@servicemail.foo Hi imaginary friend, how are you doing? I'm sending you a text message through Zephyr. where you replace `1234567890@servicemail.foo` with the email address of the person you wish to reach (you can look up the email address for a given cellular provider online). Additionally, if you're not sure what cellular provider your friend has, there are online services where you can look up the number and determine the carrier. ## SMS to Zephyr ### Notes Do note that your message **will be accompanied by your phone number**! Messages over 140 chars will get **cut off** between the phone and Zephyr. The cell phone user will get an `invalidpducontent` error, although the first part of his/her message will get through to Zephyr. On the other hand, messages *from* Zephyr to cellphones can be as long as you like. Also, hitting "`r`" in Barnowl to reply to a zephyrgram someone sent as a text message **does not work**. You'll have to hit `[Ctrl-R]` and typing out your friend's email address. (Afterward, you can scroll back to the last one you sent to your friend and hit "`r`", which will work). ### Personals When sending a zephyr from a phone, simply text a message to `kusername@szs.mit.edu` where `kusername` is the person's Athena username. The body of your message will be relayed to the selected username. (This should not require picture or multimedia texting (MMS), although your phone may force you to switch into MMS form when it recognizes the email address format. If it's not sent as a plain text messag I'm not sure that the message gets through; it may depend on the phone). Here's what it will look like to people on zephyr: Zephyr from daemon.webzephyr 08:43 (http://szs.mit.edu) Hi kusername, nice work sending me a text message through Zephyr. Here's a text message to Zephyr test. (Sent by 1234567890@servicemail.foo via the webzephyr SMS/Email to Zephyr gateway. Zephyr replies to daemon.webzephyr -c szs -i 1234567890@servicemail.foo ) ### Classes Simply send messages to **classname+instance@szs.mit.edu** (the instance is optional, but the plus preceeding it is not). Your message will appear like this: classname / instance / daemon.webzephyr 02:56 (http://szs.mit.edu) A test message! (Sent by 1234567890@servicemail.net via the webzephyr SMS/Email to Zephyr gateway. Zephyr replies to daemon.webzephyr -c szs -i 1234567890@servicemail.foo ) ### Filtering As it turns out, for the same reasons that make replying to text messages such a pain, messages sent to Zephyr will appear in your personals (and can be viewed in Barnowl with the shortcut `[Alt-p]`) but messages you send in reply will not show up. This can make it annoying to carry on a conversation. To get text messages sent through Zephyr to show up in your personals (in Barnowl), you can edit your personal filter. To get your changes to persist across Barnowl sessions, you should directly edit your startup configuration file. This, by default, is the `startup` file in the `~/.owl` folder (where "~" stands for your home folder, so the full path should be something like `/mit/kusername/.owl/startup`). So open up the "startup" file in your favorite text editor. If you're not sure which, try double-clicking the "startup" file, which should open it up in `gedit`. Or, if you're in a dialup ssh session, try `nano`. nano ~/.owl/startup Now find the line that starts with `filter personal` and edit it. Barnowl is picky about formatting, so here are some examples. This includes all your SMS <-> Zephyr messages in your personals and also colors your personal messages green. filter personal -c green ( class ^szs$ ) or ( isprivate ^true$ and ( not type ^zephyr$ or ( class ^message$ ) ) ) To color all your SMS <-> Zephyr messages separately from your other personals messages, add another line that will override the coloring you gave it under the personal filter: filter szs -c cyan ( class ^szs$ ) or ( sender daemon.webzephyr@ATHENA.MIT.EDU ) So you'll have general personals in one color, and SMS <-> Zephyr messages in a separate color, both of which appear when you hit `[Alt-p]`. If you ever need to revert your personal filter, the default is: isprivate ^true$ and ( not type ^zephyr$ or ( class ^message ) ) Now to reload your Barnowl configuration, in Barnowl, run :source ~/.owl/startup Therefore you could have multiple startup files if you wish. However, do note that if you don't specify (overwrite) a filter in `startup2`, it will remain in its `startup` state. In other words, there is no original Barnowl filter configuration that your filters will revert to. ### Screen If you are going to regularly send and receive text messages using the Barnowl client for Zephyr, you will probably want a Barnowl instance running 24/7 so that whoever texts you won't encounter a `user not subscribed` error and so that your text message conversations don't disappear each time you quit Barnowl. A good way to do this is to use screen and run it on the SIPB dialup machine, which allows you to run a Barnowl session within screen on the SIPB dialup machine that's theoretically up 24/7 (sadly outages do occur). See [UsingScreen](http://sipb-www.scripts.mit.edu/doc/wiki/UsingScreen) for more information; the basic idea is to `ssh` to `kusername@linux.mit.edu` and run `add kchen; owl-screen`, and in the future after `ssh`-ing to `kusername@linux.mit.edu` run `screen -dr`.