Text

I thought I’d post some scripts that I’ve been using to build FreeSWITCH 1.2 on Ubuntu 12.04 LTS. They’re a little rough, but they should help getting people up and running quickly.

Text

This little one liner will make the lame time stamps on Polycom phone logs look, well… readable. I put it here on the interwebs with hope that it might make your life easier, but really, I just don’t want to ever type it again.

sed "s/^\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1\/\2\/`date +%y` \3:\4:/" YOUR_POLYCOM_LOGFILE

BEFORE:
0925025032 |sip  |4|00
0925025105 |sip  |4|00
0925025138 |sip  |4|00

AFTER:
09/25/12 02:50:32 |sip  |4|00
09/25/12 02:51:05 |sip  |4|00
09/25/12 02:51:38 |sip  |4|00

Throw in the “-i” if you want to edit them in-place.

Text

Just a quick note to all the people showing up to ClueCon this year… You should give the exact address of the hotel to your cab driver. It is not sufficient to say, “Take me to the Hyatt Chicago Magnificent Mile.” My driver (who had been working in Chicago for over a decade) took me to THREE different Hyatts. It cost me an extra $25 for him to tour the city. Finally, I busted out google and got the exact address. In the end, I had to do his job and I paid for it. Grrr.

Here is it for reference:

Hyatt Chicago Magnificent Mile

633 N St. Clair St.

BTW, If you’re at the conference, let’s meet up!

email: gabe@gundy.org

twitter: @gabegundy

sms: 801-822-9550

Photo

In what way is the Video failing on my Mac Mini? Mac->HDMI->DVI->Samsung

Text

Sometimes you don’t want to mess around with people cracking into your SIP servers and run up your phone bill (aka toll fraud). So, with this little script, we block all traffic from anywhere and everywhere. Be careful, it’s pretty heavy handed. BTW, there are some outputs for ClearOS, IPtables and Ubuntu’s UFW.

This should be useful for people running, FreeSWITCH, Asterisk, OpenSIPS and Kamailio.

#!/bin/bash

################################################################################
# We don't like blocking of huge parts of the world, but we often don't have the
# time or resources to deal with those who try to haxor our networks. kthanksbye
################################################################################

# Edit this to fit your level of frustration.
REGISTRIES="CHANGE_ME"

# This is how I roll:
#REGISTRIES="(AfriNIC|APNIC|LACNIC|RIPE NCC)"

################################################################################
# APNIC     Asia/Pacific Region
# ARIN      North America Region
# AfriNIC   Africa Region
# LACNIC    Latin America and some Caribbean Islands
# RIPE NCC  Europe, the Middle East, and Central Asia
################################################################################

IANA="http://www.iana.org"
IPV4_LIST="/assignments/ipv4-address-space/ipv4-address-space.txt"

REGEX="[0-9]{1,3}\.0\.0\.0/8"

BLOCK_LIST=`wget --quiet -O - ${IANA}${IPV4_LIST} | \
egrep "${REGISTRIES}" | \
awk '{print $1}' | \
sed "s/\//.0.0.0\//" | \
sed "s/^0*//"`

for NET in ${BLOCK_LIST}; do
    if [[ ${NET} =~ ${REGEX} ]]; then
        # Time to do your thing.
        echo "Sorry to break things off, ${NET}, it's not you... it's me."

        ########################################################################
        # IPtables
        ########################################################################
        #iptables -I INPUT -j LOG --log-prefix "${NET} Dropped: " --log-level 7
        #iptables -I INPUT -s ${NET} -j DROP

        ########################################################################
        # ClearOS firewalls - Blocked Incoming Connections
        # (add to the RULES section of /etc/clearos/firewall.conf)
        ########################################################################
        #echo "${NET}||0x10000002|0|${NET}|| \\" | sed "s/\//_/"

        ########################################################################
        # Ubuntu's UFW - Uncomplicated Firewall
        ########################################################################
        #sudo ufw deny from ${NET}

    fi
done

Happy hacking!

Photo

This is a pic of our new daughter, Eve (about 5 hours old).

Funny how the hospital warns you about announcing the birth of your baby because they know that druggies show up to snatch the pain killers in the house.  Well, any users what would like to come welcome our daughter home should also be aware that we have a 2:1 people-to-gun ratio at our house :)

Anyway… Wow she’s precious!

Update: My bother tells me that it’s not clear how many guns there are at my house. 8 people, 4 guns :)

Text

UPDATED: Now works with Ubuntu 12.04 LTS

Also, the web server is currently configured to block squid-deb-proxy (if you don’t use it, you should).

This little bash script will get Blink installed properly. This is what I’ve been using when testing FreeSWITCH and OpenSIPS. I guess it would work for my Asterisk buddies too ;)

#!/bin/bash
##############################################
KEY_URL="ag-projects.com"
KEY_NAME="agp-debian-gpg.key"
UBUNTU_VERSION="precise"
LIST_NAME="${KEY_URL}.list"

wget http://download.${KEY_URL}/${KEY_NAME}
sudo apt-key add ${KEY_NAME}

rm ${KEY_NAME}

cat << EOF > ${LIST_NAME}
## Sources for AG Projects (makers of Blink).
deb http://${KEY_URL}/ubuntu ${UBUNTU_VERSION} main
EOF

sudo chown root.root ${LIST_NAME}
sudo chmod 644 ${LIST_NAME}
sudo mv ${LIST_NAME} /etc/apt/sources.list.d/
echo "Updating packages... this might take a while."
sudo apt-get -qq update
echo "Installing Blink."
sudo apt-get -y install blink
##############################################

And there you go. That’s the best SIP client out for Linux. Why isn’t this in the Ubuntu repos already? That’s my question.

Photo

Wow! Jazz tickets (2nd row)! Thanks @xo

Photo

SOPA is broken… So is the Izeni site :/ Better click on over there and check it out soon; it will self-heal at the end of the day. Code is available for the next time we have to pull stunts like this. It takes the form of Django middleware. 

Photo

Don’t you think if the school is going to give email addresses to our kids that they should also help them identify lame emails before they hit SEND?

This was from my son. It can only improve from here.

Photo

Looking at this picture, how do you know for sure that AT&T is my cell provider?

Text

I just thought this was a cool note on the last release of PySide, 1.0.9:

The PySide project is developed in the open, with all facilities you’d expect from any modern OSS project such as all code in a git repository [1], an open Bugzilla [2] for reporting bugs, and an open design process [3]. We welcome any contribution without requiring a transfer of copyright.

They should also mention that it’s under the LGPL, but still, that’s a good stance.

Now, the real questions is, will there be a Windows installer for this version? With 1.0.8, we were not so lucky.

Photo

Ha! I just pulled ahead of some sucker who’s now officially the worst dad in the world. That’s the power of homemade pizza.

Answer
  • Question: Gabe, my brother Dave often tells people to "Ask me anything." Were you inspired by him at all in naming this "Ask me Anything"? - Anonymous
  • Answer:

    I’ve thought of a number of ways to answer this, but perhaps the most efficient way for you to find out would be to ask your brother, Dave.

Photo

I don’t know why I think this is so funny. I hope my employees think it’s funny too! (You kinda need to know vim to get it. It doesn’t hurt to know Jordan too!)