<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roach on Medium]]></title>
        <description><![CDATA[Stories by Roach on Medium]]></description>
        <link>https://medium.com/@roach?source=rss-80ee71bb2b4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RNYrWPYX_b0VY7VA.jpeg</url>
            <title>Stories by Roach on Medium</title>
            <link>https://medium.com/@roach?source=rss-80ee71bb2b4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:48:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roach/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Replacing Screen Time with Dial Tones]]></title>
            <link>https://roach.medium.com/replacing-screen-time-with-dial-tones-601e8521941b?source=rss-80ee71bb2b4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/601e8521941b</guid>
            <category><![CDATA[screentime]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[parenting]]></category>
            <category><![CDATA[voip]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Roach]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 09:19:46 GMT</pubDate>
            <atom:updated>2026-02-25T05:33:51.055Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s the situation: my kids are old enough to have a conversation on the phone, but too young for cell phones. They wanted to call their grandparents and aunts whenever they wanted. I wanted them to be able to do that without handing them a screen.</p><p>So I did what any reasonable person would do — I put a real telephone in their playroom, wired it up to a Pi Zero 2 W running Asterisk, connected it to the actual phone network through Twilio, and made a laminated card with photos of family members next to two-digit codes. Pick up the phone, look at Grandma’s picture, dial <strong>21</strong>. That’s it. A three-year-old can do this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mqZwsbWMDtUcqq-QS7YyHg.png" /></figure><p>Side note: the other phone on the system is a pay phone in my office. Because why not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fbipycb9LCPhfmdsPn4XjA.png" /></figure><h3>What We’re Working With</h3><ul><li><strong>Raspberry Pi Zero 2 W</strong> running Debian Bookworm</li><li><strong>Asterisk 22</strong> — open-source PBX software (the thing that makes phone calls happen)</li><li><strong>Twilio Elastic SIP Trunking</strong> — gives us real phone numbers that connect to the actual phone network</li><li><strong>Grandstream HT802</strong> — a ~$46 box with two ports that converts SIP (internet phone stuff) into regular analog phone jacks</li><li><strong>Two phones, two lines</strong> — office pay phone on port 1, kids’ playroom phone on port 2</li></ul><pre>Internet<br>  └── Twilio SIP Trunk<br>        └── Raspberry Pi Zero 2 W (Asterisk)<br>              └── Grandstream HT802<br>                    ├── Port 1: Office Pay Phone<br>                    └── Port 2: Kids&#39; Playroom Phone</pre><h3>Setting Up the Pi</h3><p>Flash Debian <a href="https://www.raspberrypi.com/software/operating-systems/">Bookworm</a> onto your Pi Zero 2 W and get it on the network. Once you can SSH in, update everything:</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><p><strong>Installing Asterisk 22</strong></p><p>Install the build dependencies:</p><pre>sudo apt install -y build-essential libxml2-dev libncurses5-dev \<br>  libsqlite3-dev libssl-dev libjansson-dev libedit-dev uuid-dev \<br>  libxslt1-dev liburiparser-dev wget curl</pre><p>Then download and compile:</p><pre>cd /usr/src<br>sudo wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22-current.tar.gz<br>sudo tar xzf asterisk-22-current.tar.gz<br>cd asterisk-22.*/<br>sudo contrib/scripts/get_mp3_source.sh<br>sudo ./configure<br>sudo make menuselect  # Enable codec_opus, format_mp3 if you want<br>sudo make -j4<br>sudo make install<br>sudo make samples<br>sudo make config<br>sudo ldconfig</pre><p>Fair warning — make -j4 on a Pi Zero 2 W is slow. Go make coffee, maybe lunch too.</p><p>Once it’s done, enable and start the service:</p><pre>sudo systemctl enable asterisk<br>sudo systemctl start asterisk<br>sudo asterisk -rvvv   # Connect to the CLI to make sure it&#39;s alive</pre><h3>Twilio — Getting Real Phone Numbers</h3><p>Before configuring anything on the Pi, you need Twilio set up. This is where your phone numbers and PSTN connectivity come from.</p><ol><li>Sign up at <a href="https://www.twilio.com/">twilio.com</a> and upgrade to a paid account (trial accounts can’t receive calls from unverified numbers, which kind of defeats the purpose)</li><li>Buy two phone numbers — one for each line</li><li>Go to <strong>Elastic SIP Trunking → Create Trunk</strong></li><li><strong>Termination</strong> (outbound from your PBX): Create a Credential List with a username/password, set the Termination SIP URI</li><li><strong>Origination</strong> (inbound to your PBX): Add sip:YOUR.PUBLIC.IP:5060</li><li><strong>Phone Numbers</strong>: Associate both numbers with this trunk</li></ol><p>Write down the credential username, password, and your SIP domain — you’ll need all three for the Asterisk config in the next section.</p><h3>NAT and Port Forwarding</h3><p>Full disclosure: this is where I lost the most time. If your Pi is behind NAT — and it almost certainly is — nothing else matters until this is right. You can have perfect configs everywhere and still get silence on every call if your network isn’t forwarding the right ports.</p><p><strong>Port forwarding</strong></p><p>Forward these to your Pi’s internal IP:</p><ul><li><strong>5060 UDP</strong> — SIP signaling</li><li><strong>10000–60000 UDP</strong> — RTP audio streams</li></ul><p><strong>Double NAT</strong></p><p>If you have an ISP modem AND a separate router (like I do — ISP modem + Eero mesh), you need port forwarding rules on <strong>both</strong> devices. The chain looks like:</p><pre>Internet → Modem (forwards to router IP) → Router (forwards to Pi IP) → Pi</pre><p>This is annoying to set up and annoying to debug. But it works once you get it right.</p><h3>PJSIP Configuration</h3><p>Asterisk uses PJSIP for its SIP stack. Everything lives in /etc/asterisk/pjsip.conf.</p><p><strong>Transport — where NAT config meets Asterisk</strong></p><pre>[transport-udp]<br>type=transport<br>protocol=udp<br>bind=0.0.0.0:5060<br>external_media_address=YOUR.PUBLIC.IP<br>external_signaling_address=YOUR.PUBLIC.IP<br>local_net=192.168.0.0/16<br>local_net=127.0.0.0/8</pre><p>Those external_media_address and external_signaling_address lines? <strong>Do not skip these.</strong> I spent an embarrassing amount of time debugging one-way audio before figuring this out. Here&#39;s what they do: when Asterisk sets up a call, it sends SDP packets that say &quot;send audio to this IP address.&quot; Without these settings, it advertises its private 192.168.x.x address, and Twilio goes &quot;cool, I&#39;ll send your audio to... a private IP that I can&#39;t reach.&quot; One-way audio. Every time.</p><p>Set these to your public IP and the problem goes away. I cannot overstate how much time this single setting will save you.</p><p><strong>Extensions — one block per phone</strong></p><p>Each phone needs three things: an endpoint, auth credentials, and an AOR (address of record). Here’s extension 100 — the office pay phone:</p><pre>[100]<br>type=endpoint<br>context=internal<br>disallow=all<br>allow=ulaw<br>allow=alaw<br>allow=opus<br>auth=100<br>aors=100<br>direct_media=no<br>rtp_symmetric=yes<br>force_rport=yes<br>rewrite_contact=yes<br>ice_support=yes</pre><pre>[100]<br>type=auth<br>auth_type=userpass<br>password=STRONG_RANDOM_PASSWORD_HERE<br>username=100</pre><pre>[100]<br>type=aor<br>max_contacts=1<br>remove_existing=yes<br>qualify_frequency=30</pre><p>Copy-paste the whole block for extension 101 (the playroom phone), changing the numbers. The important settings:</p><ul><li><strong>direct_media=no</strong> — forces all audio through Asterisk instead of trying to go peer-to-peer. Essential when you&#39;re behind NAT.</li><li><strong>rtp_symmetric=yes</strong> — sends RTP audio replies back to the same port they came from. NAT needs this.</li><li><strong>force_rport=yes</strong> + <strong>rewrite_contact=yes</strong> — more NAT traversal. Sensing a theme here?</li><li><strong>qualify_frequency=30</strong> — pings the phone every 30 seconds so the NAT mapping doesn&#39;t go stale</li></ul><p><strong>Twilio SIP Trunk</strong></p><p>This is the piece that connects Asterisk to Twilio. The credentials here need to match exactly what you set up in the Twilio console — if they don’t, outbound calls will fail silently and you’ll wonder why nothing works.</p><pre>[twilio]<br>type=endpoint<br>context=from-twilio<br>disallow=all<br>allow=ulaw<br>allow=alaw<br>direct_media=no<br>rtp_symmetric=yes<br>force_rport=yes<br>rewrite_contact=yes<br>aors=twilio<br>outbound_auth=twilio-auth</pre><pre>[twilio-auth]<br>type=auth<br>auth_type=userpass<br>username=YOUR_TWILIO_CREDENTIAL_USERNAME<br>password=YOUR_TWILIO_CREDENTIAL_PASSWORD</pre><pre>[twilio]<br>type=aor<br>contact=sip:your-domain.pstn.twilio.com</pre><pre>[twilio-identify]<br>type=identify<br>endpoint=twilio<br>match=54.172.60.0/30<br>match=54.244.51.0/30<br>match=54.171.127.192/30<br>match=35.156.191.128/30<br>match=54.65.63.192/30<br>match=54.169.127.128/30<br>match=54.252.254.64/30<br>match=177.71.206.192/30</pre><p>The identify section tells Asterisk &quot;trust SIP requests from these IPs without making them register.&quot; Those are <a href="https://www.twilio.com/docs/sip-trunking#ip-addresses">Twilio&#39;s signaling IP ranges</a>. Check the docs for the current list, they update occasionally.</p><h3>The Grandstream HT802</h3><p>This is the bridge between the digital SIP world and actual telephones. It’s a ~$46 box with two analog phone ports. Plug any regular phone into it — a cordless phone, a wall phone, a pay phone if you’re into that sort of thing.</p><p><strong>Configuration</strong></p><p>Access the HT802’s web UI at its IP address (check your router’s DHCP leases to find it). For each FXS port:</p><ul><li><strong>SIP Server</strong>: Your Pi’s IP (e.g., 192.168.6.22)</li><li><strong>SIP User ID</strong>: 100 (or 101 for port 2)</li><li><strong>Authenticate ID</strong>: 100 (or 101)</li><li><strong>Authenticate Password</strong>: The strong password from pjsip.conf</li></ul><p><strong>Warm Line — a great trick for kids</strong></p><p>The HT802 has this feature called “warm line” that’s perfect for the playroom phone. Under FXS PORT 2:</p><ul><li><strong>Offhook Auto-Dial</strong>: 100</li><li><strong>Offhook Auto-Dial Delay</strong>: 3</li></ul><p>Pick up the phone and wait 3 seconds — it automatically calls the other extension. Instant playroom-to-office intercom. The kids can still dial speed codes within those 3 seconds if they want to call someone else. But if they just pick up and wait, it rings my office. Pretty slick for a $46 device.</p><h3>The Dialplan — the Fun Part</h3><p>/etc/asterisk/extensions.conf is the brain of the whole operation. This is where speed dials, call routing, and all the actual phone logic lives.</p><pre>[general]<br>static=yes<br>writeprotect=no</pre><pre>[globals]</pre><pre>[internal]<br>; Extension-to-extension calls<br>exten =&gt; 100,1,Dial(PJSIP/100,30)<br> same =&gt; n,Hangup()</pre><pre>exten =&gt; 101,1,Dial(PJSIP/101,30)<br> same =&gt; n,Hangup()</pre><p><strong>Speed Dial Codes</strong></p><p>This is the whole point. The entire reason this system exists.</p><p>Each two-digit code maps to a family member:</p><pre>; Speed dial codes<br>exten =&gt; 21,1,Set(CALLERID(num)=${IF($[&quot;${CHANNEL(endpoint)}&quot;=&quot;101&quot;]?+1KIDS_LINE:+1OFFICE_LINE)})<br> same =&gt; n,Dial(PJSIP/+1XXXXXXXXXX@twilio,60)<br> same =&gt; n,Hangup()</pre><pre>exten =&gt; 22,1,Set(CALLERID(num)=${IF($[&quot;${CHANNEL(endpoint)}&quot;=&quot;101&quot;]?+1KIDS_LINE:+1OFFICE_LINE)})<br> same =&gt; n,Dial(PJSIP/+1XXXXXXXXXX@twilio,60)<br> same =&gt; n,Hangup()</pre><pre>; ... repeat for 23, 24, 25, 26, 27, etc.</pre><p>The CHANNEL(endpoint) check is a nice touch — it detects <em>which phone</em> is making the call and sets the outbound caller ID accordingly. When the kids dial 21 from the playroom, Grandma&#39;s phone shows the playroom number. When I dial from the office, it shows mine. This matters because Grandma knows which phone to call back.</p><p>We use the 20–29 range for family members. You could use 30–39 for friends, 40–49 for businesses — whatever makes sense for your printed directory.</p><p><strong>Full Outbound Dialing</strong></p><p>For calling any arbitrary number, we use the classic PBX convention — dial 9 to get an outside line, then the number:</p><pre>; Outbound via Twilio - dial 9 + 10-digit number<br>exten =&gt; _9NXXNXXXXXX,1,GotoIf($[&quot;${CHANNEL(endpoint)}&quot;=&quot;101&quot;]?out101:out100)<br> same =&gt; n(out100),Set(CALLERID(num)=+1OFFICE_LINE)<br> same =&gt; n,Dial(PJSIP/+1${EXTEN:1}@twilio,60)<br> same =&gt; n,Hangup()<br> same =&gt; n(out101),Set(CALLERID(num)=+1KIDS_LINE)<br> same =&gt; n,Dial(PJSIP/+1${EXTEN:1}@twilio,60)<br> same =&gt; n,Hangup()</pre><pre>; Outbound via Twilio - dial 9 + 1 + 10-digit number<br>exten =&gt; _91NXXNXXXXXX,1,GotoIf($[&quot;${CHANNEL(endpoint)}&quot;=&quot;101&quot;]?out101:out100)<br> same =&gt; n(out100),Set(CALLERID(num)=+1OFFICE_LINE)<br> same =&gt; n,Dial(PJSIP/+${EXTEN:1}@twilio,60)<br> same =&gt; n,Hangup()<br> same =&gt; n(out101),Set(CALLERID(num)=+1KIDS_LINE)<br> same =&gt; n,Dial(PJSIP/+${EXTEN:1}@twilio,60)<br> same =&gt; n,Hangup()</pre><p>Quick Asterisk pattern primer if you haven’t seen this before: _ starts a pattern, 9 is a literal prefix, N matches digits 2-9, X matches 0-9. So _9NXXNXXXXXX matches 9 + any valid 10-digit North American number. ${EXTEN:1} strips off the leading 9 before handing it to Twilio.</p><p><strong>3-Digit Service Codes</strong></p><p>This one bit me. Numbers like 911, 311, and 933 need to work without the 9 prefix — but 911 starts with 9, which means the outbound pattern would try to match it as an outside call and fail. The fix:</p><pre>exten =&gt; _NXX,1,Set(CALLERID(num)=${IF($[&quot;${CHANNEL(endpoint)}&quot;=&quot;101&quot;]?+1KIDS_LINE:+1OFFICE_LINE)})<br> same =&gt; n,Dial(PJSIP/${EXTEN}@twilio,60)<br> same =&gt; n,Hangup()</pre><p>_NXX catches all 3-digit numbers from 200-999 and sends them straight to Twilio. Your explicit extension matches (100, 101) and speed dials (21-27) take priority because Asterisk always prefers exact matches over patterns. So everything plays nicely together.</p><p><strong>Inbound Call Routing</strong></p><p>When someone calls one of your Twilio numbers from the outside, this is what routes it to the right phone:</p><pre>[from-twilio]<br>; Office line rings the office pay phone<br>exten =&gt; +1XXXXXXXXXX,1,Dial(PJSIP/100,30)<br> same =&gt; n,Hangup()<br>exten =&gt; 1XXXXXXXXXX,1,Dial(PJSIP/100,30)<br> same =&gt; n,Hangup()</pre><pre>; Kids line rings the playroom phone<br>exten =&gt; +1XXXXXXXXXX,1,Dial(PJSIP/101,30)<br> same =&gt; n,Hangup()<br>exten =&gt; 1XXXXXXXXXX,1,Dial(PJSIP/101,30)<br> same =&gt; n,Hangup()</pre><pre>; Catch-all — ring both phones<br>exten =&gt; _+.,1,Dial(PJSIP/100&amp;PJSIP/101,30)<br> same =&gt; n,Hangup()<br>exten =&gt; _X.,1,Dial(PJSIP/100&amp;PJSIP/101,30)<br> same =&gt; n,Hangup()</pre><p>You’ll notice each number is matched twice — with and without the + prefix. Twilio sends the + in the SIP INVITE, but it doesn&#39;t hurt to handle both formats. I learned this the hard way when inbound calls were hitting &quot;extension not found&quot; errors. The catch-all at the bottom rings both phones for any number you haven&#39;t explicitly mapped.</p><h3>The Printed Directory</h3><p>This is the part that makes the whole system worth it. Not the Asterisk config, not the NAT debugging — this.</p><p>I made a laminated card with photos of family members and their two-digit codes:</p><ul><li><strong>21</strong> 📷 Grandma</li><li><strong>22</strong> 📷 Aunt Sarah</li><li><strong>23</strong> 📷 Uncle Mike</li><li><strong>24</strong> 📷 Grandpa Joe</li><li>…and so on</li></ul><p>It sits right next to the playroom phone. The kids pick up the handset, look at who they want to call, and dial two digits. That’s the whole UX. No menus, no touchscreens, no apps. Just a picture of Grandma and the number 21.</p><p>Three-year-olds can do this. And they do.</p><h3>What It Costs</h3><ul><li><strong>Raspberry Pi Zero 2 W</strong> — ~$15</li><li><strong>Grandstream HT802</strong> — ~$46</li><li><strong>Two analog phones</strong> — ~$10 each at thrift stores</li><li><strong>Twilio phone numbers</strong> — $1.15/mo each</li><li><strong>Twilio calling</strong> — ~$0.014/min outbound</li><li><strong>Monthly running cost</strong> — ~$2.30 + usage</li></ul><p>The hardware is under $100 total, and the whole system costs less per month than a single cell phone line. No subscriptions beyond Twilio’s per-minute rates.</p><h3>Lock It Down</h3><p>OK so you built the thing and it works. Now you need to secure it — because <strong>you are exposing port 5060 to the internet.</strong> As a security person by trade, I need to say this clearly: SIP scanners <em>will</em> find you. Within hours. They’re automated, they’re everywhere, and they will try to register fake extensions and make calls on your dime if you let them.</p><p><strong>UFW Firewall</strong></p><p>The most important thing you can do — restrict SIP to only Twilio’s IPs and your local network:</p><pre>sudo apt install ufw<br>sudo ufw default deny incoming<br>sudo ufw default allow outgoing</pre><pre># SSH<br>sudo ufw allow 22/tcp</pre><pre># SIP — only from your LAN and Twilio&#39;s IP ranges<br>sudo ufw allow from 192.168.0.0/16 to any port 5060 proto udp<br>sudo ufw allow from 54.172.60.0/30 to any port 5060 proto udp<br>sudo ufw allow from 54.244.51.0/30 to any port 5060 proto udp<br>sudo ufw allow from 54.171.127.192/30 to any port 5060 proto udp<br>sudo ufw allow from 35.156.191.128/30 to any port 5060 proto udp<br>sudo ufw allow from 54.65.63.192/30 to any port 5060 proto udp<br>sudo ufw allow from 54.169.127.128/30 to any port 5060 proto udp<br>sudo ufw allow from 54.252.254.64/30 to any port 5060 proto udp<br>sudo ufw allow from 177.71.206.192/30 to any port 5060 proto udp</pre><pre># RTP — must be open for audio<br>sudo ufw allow 10000:60000/udp</pre><pre>sudo ufw enable</pre><p>Now random SIP scanners from the internet get dropped at the firewall. Only Twilio and your local devices can talk SIP to Asterisk.</p><p><strong>Kill unused modules</strong></p><p>Asterisk loads a bunch of channel drivers by default that you don’t need — IAX2, MGCP, Skinny, Unistim. Each one listens on its own port, expanding your attack surface for no benefit. Disable them in /etc/asterisk/modules.conf:</p><pre>noload = chan_iax2.so<br>noload = chan_mgcp.so<br>noload = chan_skinny.so<br>noload = chan_unistim.so</pre><p><strong>fail2ban</strong></p><p>For anything that gets past the firewall, fail2ban monitors your Asterisk logs and auto-bans IPs that fail authentication:</p><pre>sudo apt install fail2ban</pre><p>Create /etc/fail2ban/jail.local:</p><pre>[DEFAULT]<br>bantime = 3600<br>findtime = 600<br>maxretry = 3</pre><pre>[sshd]<br>enabled = true</pre><pre>[asterisk]<br>enabled = true<br>port = 5060<br>filter = asterisk<br>logpath = /var/log/asterisk/messages.log<br>maxretry = 3<br>bantime = 86400<br>findtime = 600</pre><p>Enable security logging in /etc/asterisk/logger.conf:</p><pre>messages.log =&gt; notice,warning,error,security</pre><p>Reload the logger with asterisk -rx &#39;logger reload&#39; and you&#39;re set. Three failed auth attempts = banned for 24 hours.</p><p><strong>Actual passwords, please</strong></p><p>Don’t use ext100pass. I know it&#39;s tempting. Generate something real:</p><pre>openssl rand -base64 16 | tr -dc &#39;a-zA-Z0-9&#39; | head -c 20</pre><p>My kids call their grandparents now. Like, on their own. They walk over to the phone, look at the card, and dial two numbers. That’s the whole point of this project, and it works.</p><h3>Troubleshooting</h3><p>I hit every single one of these. Saving you the trouble.</p><p><strong>One-way audio</strong></p><p>You can hear them but they can’t hear you, or vice versa. This is almost always the NAT config. Run sudo asterisk -rx &#39;pjsip set logger on&#39; and make a call — look at the SDP in the INVITE. If the c= line shows a 192.168.x.x address, your external_media_address isn&#39;t set right. Go back to the transport section.</p><p><strong>Inbound calls go nowhere</strong></p><p>Tail the log while calling in: sudo tail -f /var/log/asterisk/messages.log. If you see &quot;extension not found in context &#39;from-twilio&#39;&quot;, the number format doesn&#39;t match your dialplan. Twilio sends numbers with a + prefix — make sure you have patterns for both +1XXXXXXXXXX and 1XXXXXXXXXX.</p><p><strong>Phones won’t register</strong></p><p>Run sudo asterisk -rx &#39;pjsip show endpoints&#39; and check if they show as &quot;Avail.&quot; If they&#39;re not listed at all, the phone isn&#39;t even trying to register. Check the SIP server IP, username, and password on the HT802.</p><p><strong>Connected calls with total silence</strong></p><p>SIP signaling on port 5060 is working, but audio is a different protocol (RTP) on ports 10000–60000. If those ports aren’t forwarded through every NAT layer between the internet and your Pi, you get connected calls with dead air. Double-check your port forwarding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=601e8521941b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VoIP bluetooth-connected home intercom vintage payphone]]></title>
            <link>https://roach.medium.com/voip-bluetooth-connected-home-intercom-vintage-payphone-b620c2aa9007?source=rss-80ee71bb2b4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b620c2aa9007</guid>
            <category><![CDATA[telephone-systems]]></category>
            <category><![CDATA[voip]]></category>
            <category><![CDATA[telephony]]></category>
            <category><![CDATA[retro-tech]]></category>
            <category><![CDATA[pay-phones]]></category>
            <dc:creator><![CDATA[Roach]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 01:09:27 GMT</pubDate>
            <atom:updated>2023-08-09T02:09:22.142Z</atom:updated>
            <content:encoded><![CDATA[<h3>Roach’s Payphone</h3><p>A VoIP, bluetooth-connected, multimodal, home intercom enabled vintage motel payphone</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPXl1pujNVZGdvz3TMSOLA@2x.jpeg" /><figcaption>Contrary to all indications, it is not a time machine.</figcaption></figure><p>Last year, my friend <a href="https://bert.org/">Bert Fan</a> finally convinced me to buy a payphone.</p><p>We’d been commiserating for years about how we both wanted a payphone for nostalgic reasons and general elder hacker shenanigans. I didn’t really have a plan for what the hell I would use it for, so it sat on the back burner.</p><p>That changed when Bert got his and did <a href="https://bert.org/2022/06/02/payphone/">an awesome write up</a> on how he’d set it up as an intercom for his family.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*7Q0H_vVYZQoZhtmd-xI_BA@2x.jpeg" /></figure><p>I love teaching my kid about technology and retro electronics, so seeing Bert’s implementation was truly the inspiration I needed to finally buy one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*QKW6s1Ym0DPvbDjeBSlOrg@2x.jpeg" /><figcaption>I have impulse purchasing issues.</figcaption></figure><p>My son was absolutely thrilled when the phone arrived. My UPS guy, less so. I had no idea how much these things weighed until I had one delivered to my house. They’re around 60 lbs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*S5b-aMj25Xc7LxkjpFYj1A@2x.jpeg" /><figcaption>How did he intuitively know how to use it?</figcaption></figure><p>The payphone really ties my home office aesthetic together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*fuJyD5_uQqKkZyu38_RyRw@2x.jpeg" /></figure><p>Once the payphone arrived, I collected all the necessary components and set out to copy Bert’s intercom idea. The intercom setup worked perfectly. Rather than the rad 90s translucent handset, I opted for something that conveyed the seriousness of the business at hand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jowWOa3P2SlU4EtdziW1ag@2x.jpeg" /></figure><p>By now you may be asking yourself “but where does all of that other technological scope creep come in?” worry not, dear reader, we’ll get to that in future installments…</p><ul><li>Setting up RasPBX</li><li>Getting Twilio’s SIP service to work</li><li>Using RasPBX as an intercom service</li><li>Setting up 2-digit aliases for wast toddler dialing</li><li>Using the Payphone as an audio input for Zoom</li><li>Using Cell2Jack to use the payphone as a bluetooth device</li></ul><p>I’ll try to keep these short and to the point.</p><p>Thanks for reading and I hope you’ll follow along in my first actual attempt to blog 🥳</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b620c2aa9007" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slack ♥ PyCon]]></title>
            <link>https://roach.medium.com/slack-pycon-58d98168cfb6?source=rss-80ee71bb2b4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/58d98168cfb6</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[pycon]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Roach]]></dc:creator>
            <pubDate>Wed, 15 May 2019 01:29:18 GMT</pubDate>
            <atom:updated>2019-05-15T17:00:03.914Z</atom:updated>
            <content:encoded><![CDATA[<p>Conferences, though sometimes exhausting, can be immensely valuable to us as individuals. They reinforce our sense of belonging to a community. Conferences can also be valuable to companies like Slack, as they provide an opportunity to show that we value and support these communities.</p><p>These are the communities who are building the foundations on which our success is built. They are an opportunity to meet up in real life, get to know people you find inspiring and discover new people and projects you may not have found otherwise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FvShtjOtHQLCHhWaVzPGYA.jpeg" /><figcaption>We use Python for DevOps tooling, several critical tools, and we provide Python tools for our developers.</figcaption></figure><p>This post surveys Slack’s history with PyCon, focusing on what we get out of it, and how important it is for us to give back.</p><h3>Why PyCon is important</h3><p>As a developer, PyCon is one of my favorite events. The Python community is what other communities should and often do strive to be. The feeling of approachability and inclusivity that you experience as a first time attendee is what drives excitement in the talks and engagement on the floor. This event gets folks excited to build things, eager to learn, and provides a venue to showcase and share the amazing things they’ve built.</p><blockquote>This event gets folks excited to build things, eager to learn, and provides a venue to showcase and share the amazing things they’ve built.</blockquote><h3>2017: The breakout</h3><p>In 2017, I (<a href="https://twitter.com/roach">Jason Roche</a>) attended PyCon for the first time. I was relatively new to Python. I ‘d spent about a year building Python developer tools at Slack and had recently released our <a href="https://github.com/slackapi/python-slack-events-api">Python Slack Events API Adapter for Flask</a>. I saw Pycon as an opportunity to get feedback from folks in the Python community.</p><p>Wandering around the conference, I discovered the break-out session board and asked if it would be okay to demo something I’d built for Slack developers. The organizers agreed and I put up a notecard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L58EjmzrTtrTmWatUZj5Bw.jpeg" /><figcaption>That squiggly thing is supposed to be a “tada” emoji.</figcaption></figure><p>That afternoon I set up in the breakout room, expecting a couple people to join me. 15–20 people showed up excited to hear about what I’d built and learn how to build things on Slack. I was amazed. I had a great time, got some excellent user feedback and brainstormed on changes and improvements to the library. I went back to work with a buzz of optimism and duty to give back to the community I’d become part of.</p><h3>2018: __init__</h3><p>In 2018, we did a sponsored workshop teaching how to build a Slack app. The workshop sold out at 85 seats, with more folks standing in the back. We heard a lot of feedback from the community asking where our booth was.</p><p>In that moment, we made a promise to double down on supporting this community in 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TMh0VK_R47J3rQe5eMM6g.jpeg" /><figcaption>This was my first time wearing a wireless mic.</figcaption></figure><h3>2019: A warm welcome</h3><p>This year, at PyCon 2019, we went all in. We did another workshop and lightning talk about how we build Python tools. We built a booth and filled it with Python enthusiasts and advocates for the developer community.</p><h4>Slack app workshop</h4><p><a href="https://twitter.com/rodneyu215">Rodney Urquhart</a> and I provided an introduction to the Slack Platform and the concept of apps, followed by Rodney’s presentation on the major changes we’ve recently made to the Python SDK. This was a major architectural overhaul of the SDK, after two years of incremental updates and improvements released as minor versions. Rodney wrote a whole <a href="https://medium.com/slack-developer-blog/slack-3-python-402b2f7ec893">blog post</a> about the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOSNe40uh9t-6GBNih-drQ.jpeg" /><figcaption>Rodney and I tag-teamed the workshop.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2awhIHs0VnROsn9yGIeHw.jpeg" /><figcaption>Rodney provided insight into how and why we build developer tools in Python.</figcaption></figure><p>The talk went well. The seats were full. People were focused, laughed at my terrible jokes and followed along with us as we built a simple Slack app. We had time for a brief Q&amp;A where folks asked about the SDKs and gave us some valuable feedback. Rodney even pushed a patch to the SDK during the workshop after an attendee found a bug!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYFJVU9zQ9nF5l5RD2yzRw.jpeg" /><figcaption>Rodney settles in during the workshop to ship a patch to the <a href="https://github.com/slackapi/python-slackclient">Python SlackClient</a> library.</figcaption></figure><p>By packaging our slide deck and workshop content into a sharable format and <a href="https://github.com/slackapi/pycon-2019">publishing it on GitHub</a>, we allowed folks to follow along and skip around at their own pace. This also becomes immensely valuable when the conference WiFi goes down in the middle of a developer workshop (not that that ever happens).</p><h4>Our booth</h4><p>Since this was our first time at PyCon at this scale, we wanted to make a splash. We set out to provide a welcoming station where folks could stop by and chat about their experience with Slack, learn about our Python SDKs and tools, and show us what they’ve built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZcSmsRNIFEKW3PGnXCiedA.jpeg" /><figcaption>The booth was beautiful, inviting, and very tall.</figcaption></figure><p>The layout of the booth was open and inviting, with a small sitting area for longer meetings and product demos. These product demos weren’t limited to Slack — we had a couple folks stop by to demo their Slack apps and one developer stopped by to show us their code coverage product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBR6asuRM8xqrNEaXhZfVg.jpeg" /><figcaption>These Slack / Python stickers were a big hit.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a58c2qDMApNXgtdCrH4WSQ.jpeg" /><figcaption>The App UI Guidelines and Build books were so popular we had a dinosaur guarding them.</figcaption></figure><p>We spent 3 full days engaging in conversations and demos with folks who use Slack, folks who build apps, tools, and integrations on Slack, and folks who are excited to learn what the platform can do for them. We made a lot of great connections, inspired some Slack app developers and basked in the energy of the Python community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-gJcj7M42vOP5M1LCJBaA.jpeg" /><figcaption>Matt Taylor, Rodney Urquhart, Jim Ray, Tomomi Imura, Elizabeth Kinsey, Joe Smith, Jason Roche</figcaption></figure><p>We were also so thankful for all the folks who came to speak with our excellent recruiters at the Job Fair on Sunday! There’s lots of excellent work to be done at Slack, and we’re excited to hire folks from this community to help us accomplish great work!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0bOgskuqXJUpcwaRUrEYQ.jpeg" /><figcaption>Bianca Saldana and Rob Levine are heroes behind the scenes who find us the best coworkers in the world.</figcaption></figure><p>Our commitment to the developer community is strengthened and reaffirmed by the positive interactions and actionable feedback at events like this. We thank you for providing such a warm welcome to PyCon and we can’t wait to see you all again in Pittsburgh PA at PyCon 2020! <a href="https://twitter.com/search?f=tweets&amp;q=&quot;#slacklovespython&quot;">#slacklovespython</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58d98168cfb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[There and back]]></title>
            <link>https://medium.com/slack-developer-blog/out-and-back-again-6b2f3c84f484?source=rss-80ee71bb2b4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b2f3c84f484</guid>
            <category><![CDATA[slack-platform]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[announcements]]></category>
            <dc:creator><![CDATA[Roach]]></dc:creator>
            <pubDate>Mon, 11 Dec 2017 18:23:59 GMT</pubDate>
            <atom:updated>2019-05-15T01:34:39.794Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Using link buttons and deep linking for a seamless flow between your service and Slack</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/0*kA5KlFd0uNWcWMMz." /></figure><p>Slack apps allow teams to get quick tasks done, alongside their other work, without having to context switch into another product or browser window. But not every part of your service needs to be brought into Slack. “Deep work” that takes more than a few minutes — like setting up a project management board, building a wireframe, or creating a metrics dashboard — can sometimes be a better fit for your external service or web app.</p><p>Now with <a href="https://api.slack.com/docs/deep-linking">deep linking</a> and <a href="https://api.slack.com/docs/message-attachments#link_buttons">link buttons</a> — a new type of button that enables you to link out to an external webpage — you can build a user-friendly flow to guide people from Slack to your external service, then direct them back into a particular message in Slack to continue working. In this tutorial, we’ll show you how to do it.</p><h4><strong>About link buttons</strong></h4><p><a href="https://api.slack.com/docs/message-attachments#link_buttons">Link buttons</a> are Slack message attachments that look like interactive message buttons, but rather than sending an action event to your app, they link out to an external webpage of your choice. Compared to the previous solution — static hyperlinked text — <a href="https://api.slack.com/docs/message-attachments#link_buttons">link buttons</a> UI can promote user engagement. Apps that adopt link buttons in favor of hyperlinked text have seen click-throughs increase by as much as 85%.</p><p>Aside from promoting user engagement, link buttons offer a workaround for developers building apps behind a firewall. Features like <a href="https://api.slack.com/docs/message-buttons">message buttons</a>, <a href="https://api.slack.com/docs/message-menus">message menus</a> and <a href="https://api.slack.com/dialogs">dialogs</a> can help increase app engagement, but there’s a limitation: you need to add additional webhooks to your application. Because these features require a request URL, some developers — for instance, those running an app on their company’s internal network or a service behind a firewall — were previously blocked from building interactive Slack apps. For developers who have this limitation, link buttons offer an alternative: you can build an interactive app without the overhead of adding additional endpoints.</p><h4><strong>Using link buttons</strong></h4><p>When someone clicks a link button, they’re taken to your webpage to complete a task. Once that work has been completed, you can use <a href="https://api.slack.com/docs/deep-linking">deep linking</a> to bring them back to where they left off the conversation in Slack.</p><p>You can break it down into a few steps. We’ll go through each in detail.</p><ol><li>Have your app post a message with a link button, leading to your external application or website</li><li>The user loads the website and completes a workflow</li><li>The user is directed to a “complete” page and the original Slack message is updated. A message permalink is fetched and shown to the user</li><li>The user clicks back into Slack and resumes the conversation</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*FD388dGN2C7jS8cj07JVog.gif" /><figcaption>A simple workflow initiated from a Slack message.</figcaption></figure><h4><strong>1. Post a message with a link button leading to your external app</strong></h4><p>You’ll need to keep a map of the message IDs so you can correlate the message your app posts in Slack with the task you’re giving the user. The simplest way to do this is with a dictionary that contains a reference for each channel and message timestamp:</p><pre># A dictionary to store `task_id` to message mappings</pre><pre>TASK_IDS = {}</pre><p>Next, have your app post a message with a link button which will take the user out to the pending task. The button should be associated with a unique task, like a ticket number or another unique ID. For this demo, we’ll use `LB-2375`.</p><pre># Our task ID. This could be a ticket number or any other unique ID</pre><pre>task_id = &#39;LB-2375&#39;</pre><p>Adding a link button to a message is as simple as adding an attachment containing the URL you went to link to and the text you want on the button.</p><pre># Attachment JSON containing our link button<br># For this demo app, The task ID should be the last segment of the URL<br>attach_json = [<br>    {<br>        &quot;fallback&quot;: &quot;Upgrade your Slack client to use messages like these.&quot;,<br>        &quot;color&quot;: &quot;#CC0000&quot;,<br>        &quot;actions&quot;: [<br>            {<br>                &quot;type&quot;: &quot;button&quot;,<br>                &quot;text&quot;: &quot;:red_circle:   Complete Task: &quot; + task_id,<br>                &quot;url&quot;: &quot;https://roach.ngrok.io/workflow/&quot; + task_id,<br>            }<br>        ]<br>    }<br>]</pre><p>When the message is posted, Slack’s Web API will return some data about the message (see `res` below) such as the channel, timestamp and message content. We’re going to store the channel and timestamp to the map under the task ID.</p><pre># Post the message to Slack, storing the result as `res`<br>res = slack.api_call(<br>    &quot;chat.postMessage&quot;,<br>    channel=&quot;#link-buttons&quot;,<br>    text=&quot;Let&#39;s get started!&quot;,<br>    attachments=attach_json<br>)</pre><pre># Store the message `ts` and `channel`, so we can request the message<br># permalink later when the user clicks the link button<br>TASK_IDS[task_id] = {<br>    &#39;channel&#39;: res[&#39;channel&#39;],<br>    &#39;ts&#39;: res[&#39;message&#39;][&#39;ts&#39;]<br>}</pre><h4><strong>2. Guide the user through the task</strong></h4><p>Now the message is sent to the user, so they can click the link button to be guided to your external app. When they land on your page, you’ll need to grab the task ID from the URL or params, show them the task to be completed, and guide them to a completed state.</p><p>For this very simplified demo, we’re going to show the user a form with one action. When the user submits this form, we will direct them to the /completed page.</p><pre># This is where our link button will link to, showing the user a<br># task to complete before redirecting them to the `/complete` page<br>@app.route(&quot;/workflow/&lt;task_id&gt;&quot;, methods=[&#39;GET&#39;])<br>def test(task_id):<br><br>    task_form = &quot;&quot;&quot;&lt;form method=&quot;POST&quot; action=&quot;/complete/{}&quot;&gt;<br>                    &lt;input type=&quot;submit&quot; value=&quot;Do The Thing&quot; /&gt;<br>                &lt;/form&gt;&quot;&quot;&quot;.format(task_id)<br><br>    return make_response(task_form, 200)</pre><h4><strong>3. Update the message and bring them back to Slack</strong></h4><p>When the user loads the /completed page, you’ll need to update the Slack message containing the link button to show that the task has been completed, and present the user with a link back to their Slack conversation.</p><p>To update the Slack message containing the button, reference the channel and timestamp we saved in the map earlier, and call chat.update.</p><pre>@app.route(&quot;/complete/&lt;task_id&gt;&quot;, methods=[&#39;POST&#39;])<br>def complete(task_id):<br>    <em>&quot;&quot;&quot;<br>    This is where your app&#39;s business logic would live.<br>    Once the task has been complete, the user will be directed to this `/complete`<br>    page, which shows a link back to their Slack conversation<br>    &quot;&quot;&quot;<br><br>    </em># When this page loads, we update the original Slack message to show that<br>    # the pending task has been completed<br>    attach_json = [<br>        {<br>            &quot;fallback&quot;: &quot;Upgrade your Slack client to use messages like these.&quot;,<br>            &quot;color&quot;: &quot;#36a64f&quot;,<br>            &quot;text&quot;: &quot;:white_check_mark:   *Completed Task: {}*&quot;.format(task_id),<br>            &quot;mrkdwn_in&quot;: [&quot;text&quot;]<br>        }<br>    ]<br>    res = slack.api_call(<br>        &quot;chat.update&quot;,<br>        channel=TASK_IDS[task_id][&quot;channel&quot;],<br>        ts=TASK_IDS[task_id][&quot;ts&quot;],<br>        text=&quot;Task Complete!&quot;,<br>        attachments=attach_json<br>    )</pre><p>Once the message has been updated, fetch the permalink for it…</p><pre># Get the message permalink to redirect the user back to Slack<br>res = slack.api_call(<br>    &quot;chat.getPermalink&quot;,<br>    channel=TASK_IDS[task_id][&quot;channel&quot;],<br>    message_ts=TASK_IDS[task_id][&quot;ts&quot;]<br>)</pre><p>…and show the “Return to Slack” link.</p><pre># Link the user back to the original message<br>slack_link = &quot;&lt;a href=\&quot;{}\&quot;&gt;Return to Slack&lt;/a&gt;&quot;.format(res[&#39;permalink&#39;])<br><br># Redirect the user back to their Slack conversation<br>return make_response(&quot;Task Complete!&lt;br/&gt;&quot; + slack_link, 200)</pre><p><strong>That’s it! 🎉</strong></p><p>This simple flow using link buttons and deep linking enables your app’s users to complete “deep work” in your external service, then seamlessly return to where they started in Slack.</p><p>Here’s the complete code for this example:</p><p><a href="https://github.com/slackapi/python-link-button-example/blob/master/example.py">https://github.com/slackapi/python-link-button-example/blob/master/example.py</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/654638c448ff0eeb6b45740b59eac8c9/href">https://medium.com/media/654638c448ff0eeb6b45740b59eac8c9/href</a></iframe><p>To run this example, clone the repository or copy the code from above, and run:</p><pre>export SLACK_API_TOKEN=”&lt;YOUR SLACK BOT TOKEN&gt;” <br>python link-buttoms.py</pre><p><em>Need help? Find us in the </em><a href="http://dev4slack.xoxco.com/"><em>Bot Developer Hangout</em></a><em> </em><a href="https://dev4slack.slack.com/messages/slack-api/"><strong><em>#slack-api</em></strong></a><strong><em> </em></strong><em>channel, </em><a href="https://twitter.com/slackapi"><em>reach out on Twitter</em></a><em>, or </em><a href="https://github.com/slackapi/python-link-button-example/issues"><em>create an issue</em></a><em> on GitHub.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b2f3c84f484" width="1" height="1" alt=""><hr><p><a href="https://medium.com/slack-developer-blog/out-and-back-again-6b2f3c84f484">There and back</a> was originally published in <a href="https://medium.com/slack-developer-blog">Slack Platform Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>