Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

1 Comment

MySQL CDR for Asterisk w/ ODBC

For a long time I never had  a straight forward configuration for getting MySQL CDR setup on later versions of Asterisk(1.8+). This is to help anyone else that thinks this would be useful and also a reference for me next time I need to do another setup. This should be the same for 1.8+ but I’m just using 11 right now.

cdr_mysql has been deprecated in Asterisk 1.8. To get it working with MySQL you will need to use ODBC and cdr_adaptive_odbc module.

Steps are from an install using Ubuntu 12.01, Asterisk 11.9.0 and MySQL server located on a different machine.

Install Dependancies

unixodbc-dev – UnixODBC devel libraries
libmyodbc – ODBC MySQL Connector
libmysqlclient-dev – MySQL Client

# sudo apt-get install unixodbc-dev libmyodbc libmysqlclient-dev

Configure ODBC

Edit /etc/odbc.ini

Description = MySQL Asterisk database
Trace = Off
TraceFile = stderr
Driver = MySQL
PORT = 3306

Edit /etc/odbcinst.ini

Description = MySQL driver
Driver =
Setup =
CPTimeout =
CPReuse =
UsageCount = 1

Install Asterisk

 # cd /usr/src
 # wget
 # tar xvfz asterisk-11.*.tar.gz
 # cd asterisk-11.*
 # ./configure

Verify in menuselect that func_odbc and res_odbc modules are going to be build

# make menuselect

Now install

# make
# make install

Configure Asterisk

Setup any other configuration needed like sip.conf or extensions.conf.

Edit /etc/asterisk/res_odbc.conf

enabled => yes
dsn => asterisk-cdr
username => MYSQL_USER
password => MYSQL_PASS
pooling => no
limit => 1
pre-connect => yes

Edit /etc/asterisk/cdr_odbc.conf

table=cdr ;"cdr" is default table name
usegmtime=no ; set to "yes" to log in GMT
hrtime=yes ;Enables microsecond accuracy with the billsec and duration fields

Setup MySQL

Make sure you have the user entered in the ODBC configs setup and with access from which ever location. Now create the cdr table, this exact create was suggest by a guy named Eugene on the Asterisk Wiki.

 `calldate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
 `dcontext` VARCHAR(80) NOT NULL DEFAULT '',
 `lastapp` VARCHAR(200) NOT NULL DEFAULT '',
 `lastdata` VARCHAR(200) NOT NULL DEFAULT '',
 `dstchannel` VARCHAR(50) NULL DEFAULT NULL,
 `accountcode` VARCHAR(20) NULL DEFAULT NULL,
 `uniqueid` VARCHAR(32) NOT NULL DEFAULT '',
 PRIMARY KEY (`id`),
 INDEX `calldate` (`calldate`),
 INDEX `dst` (`dst`),
 INDEX `src` (`src`),
 INDEX `dcontext` (`dcontext`),
 INDEX `clid` (`clid`)

Testing it out

At this point if everything is setup correctly, starting asterisk and taking a call should generate a CDR. Start asterisk and give it a shot! Don’t want to be flying blind?  Try out a couple steps to try.

Check isql for ODBC MySQL connection

With isql you can connect with the ODBC DSN you just created.

# isql asterisk-cdr -v
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |

Your output should look like the above with the Connected message, then the select should something like SQLRowCount returns 0. If you did not get that, go back and check the config and make sure you have the correct credentials and have permission from that machine. You can test this also by doing a normal # mysql -h HOST -u USER -p

Check Asterisk for ODBC modules and connection

Verify /usr/lib/asterisk/modules/ exists and should probably be 755 permissions.

In Asterisk, check module is accessible and shows a good connection:

asterisk*CLI> odbc show
ODBC DSN Settings
Name: asterisk-cdr
DSN: asterisk-cdr
Last connection attempt: 1970-01-01 00:00:00
Pooled: No
Connected: Yes

Custom CDR parameters

With using cdr_adaptive_odbc, you can add additional parameters to your CDR logs without having to modify and configuration. Create a new column in the cdr table and within the call, perform Set(CDR(name)=value) with name being the column name. This is useful for keeping categories a call or being able to log call costs like per minute rate.

Leave a comment

Vapor Treating ABS FAIL!

I’ve been seeing posts on over the past month or so about vapor treating ABS prints to give them a nice smooth finish. It looked fairly simple and I had most of the stuff to give it a shot so this was my attempt.


This was a print from Halloween, the base was already a little messed up so perfect to try something on.
IMG_0913 IMG_0914
IMG_0917 IMG_0915

Getting Started:

I had checked out this site to get some details on what I should do:
Found me a tin coffee can since I couldn’t find a glass jar that was big enough. I saw another vapor treatment video that used a tin can so figured it should work. I have a printrbot so I turned its bed on to 110 Celsius to get it heated up then placed the tin can with acetone on top.

IMG_0911 IMG_0912


Once that was hot enough and vapor was starting to make its way to the top of the tin, I laid some foil down with the pumpkin print then turned the bed down to 90 Celsius.

IMG_0918 IMG_0919

Turn for the worst!

I left this to work on its own for like 20 minutes and realized the heater bed was outputting way higher since I have an issue with the sensor on attached to the bed. Reading from a thermometer gun said 120 Celsius. So I adjusted it back down but the base of the pumpkin started to warp.

It started to look like it was smoothing out slowly so let it keep going. Around an hour mark it started to go even worse. The whole pumpkin started to sag and droop down. I turned the heater off and removed the pumpkin to let sit out for a little while and here is how it looks now.

IMG_0921 IMG_0922 IMG_0923 IMG_0925


What happen? Well I think 2 things were the big fail on my part. Probably was running a bit hot in the beginning. Second thing was the foil base I don’t think I had made to well so it probably was transferring a lot of heat to the bottom of the object. I tried to make fluffy layers but guess that didn’t work. Next time I probably would try the cutout of the bottom of a soda can.

Aside from the drooping, part of the pumpkin did get pretty smooth. It did lose some of the sharper details around the face but nothing too bad. This seems like it would only be good for display items and not anything functional. It didn’t evenly get smooth, the pumpkin has vertical ridges and a few of the ridges are still pretty rough.

There is one thing I don’t get. After an hour or two of the model sitting out to dry, it was still pretty malleable and gel layer feel to it. Its been about 24 hours now and its back to being super hard. The site says let set for 10 minutes to help dry out but might need a bit more time in some cases.

Just to sum it up. Watch the temp and get a good base going if you try this out!



1 Comment

New Mickey’s, Grey Goose, Belvedere Hookahs

Finally got to knock out a few bottles that I had sitting around. Just been trying to collect larger liquor bottles.

3 Hookahs

3 Hookahs

Small 1-hose Mickey’s Hookah

Little Mickeys Hookah

Little Mickeys Hookah

750ml 1-hose Belvedere Hookah

750ml Belvedere Hookah

750ml Belvedere Hookah

1.5L 2-hose Grey Goose Hookah

1.5L Grey Goose Hookah

1.5L Grey Goose Hookah

So far for the next round of drilling. I have a couple 1.5L Kettle One(& Citrus) and a 1.5. Fireball bottle! Stay tuned for more hookah posts.

1 Comment

Bar machine upgrades

This was a few months ago but late is better then never!

The bar machine got a set of upgrades recently. Biggest thing is the new skin. Tyler finished up the wood working and looks great. Doors are facing away from the front so it can be serviced without bothering much and less access from anyone messing around. Rolls around pretty good.

The touchscreen monitor has also been upgrade to a 21″ from the 15″. Was able to mount both the new monitor plus had a pipe chromed and fits all 16 tubes with a little space. I had to modify the code to make it fit the new resolution since I had it coded for 1024×764. Its not perfect but should be able to handle resolution change better.

IMG_0888IMG_0887 IMG_0890

The last upgrades are everything finally was moved over to a Raspberry Pi and running great with the touchscreen. Then I found this cool marine power outlet that works perfectly for the box. Just plug in an extension cord and its good to go and looks clean unplugged.

IMG_0891 IMG_20130323_002134 IMG_20130323_002149 IMG_20130126_234953


Leave a comment

5 months later, Raspberry Pi’s finally here!

Its taken a while since I ordered these 3 Raspberry Pi’s. Kept saying they just had delays with the suppliers.

Hope I can use them for making cool stuff. I think I might try loading a z-wave controller someones been working on at first.


How-To: Making a 2-Hose Patron Hookah

This is my DIY How-To guide on making your own hookah out of a Patron liquor bottle. Most of the parts/tools except for the hookah bowl and tray can be picked up at a local hardware store like HomeDepot.

Estimated Build Time: 2 Hours

Parts List:

  • 1 – Empty 1.75 L Patron bottle (This will be hard 😉 )
  • 2 – Empty mini Patron 50 ml shots
  • 1 – Lime green hookah bowl
  • 1 – Hookah tray
  • 1 yard – Lime green crushed velvet
  • 1 – #10 Tapered cork stopper
  • 2 – Brass hose barb 1/4″ ID x 1/8″ MIP
  • 2 – Brass hose barb 1/4″ ID x 1/4″ MIP (*This actually can be replaced with 2 more of the above brass hose barb)
  • 1 ft – 3/8″ OD copper coil (Used for refrigerator)
  • 10 ft – Clear vinyl tubing 3/8″ x 1/4″
  • Gorilla glue epoxy

* I used 2 different sized brass hose barbs. After doing a few hookahs I realized it doesn’t really matter. Its easier to use the same part across a project, plus you won’t need 2 different size drill bits. So use the smaller barbs like the ones used in the mouthpieces for the larger patron bottle.

Tool List:

  • 3/8″ Diamond glass drill bit
  • 3/8″ Regular drill bit
  • 1/2″ Diamond glass drill bit (*Not needed if you use one size brass hose barb)
  • Drill
  • Copper tubing cutters
  • Block of wood
  • Sewing machine (and patience…)
  • Sharpie
  • Tape
  • Ruler
  • Scissors
Some of the parts ready to go!

Getting Started

Once you have all the parts and tools ready then we can get started making the hookah.

Drilling MouthPieces

Lets get started by making the mouthpieces. Grab the 50 ml mini Patron shots and wet drilling a whole with the 3/8″ diamond drill bit directly on the center of the bottom of the mini bottle. Remember to keep it wet by pouring water where your drilling and go slow. You can get shards of glass or crack it if you go to fast or tilting the bit. After your done, rinse out all the glass powder or it will be hard to get off inside when dry.


Drilling Hookah Base (Big Patron Bottle)

Grab your Patron bottle and pick where you want to attach the hoses. Remember to do it not directly on the sides since you will be adding water to use the hookah so its better do it somewhat higher. I did mine above the starting of the curve of the bottom, you can see in the pics.
Start by marking with a sharpie on both sides of the bottle. Make sure to line them up so it’s not lopsided. Use the 1/2″ or 3/8″ Diamond drill bit and drill the 2 holes. Again remember to keep wet and go slow. Rinse the bottle after your done.


Gluing Barbs onto Glass

Now we need to glue all 4 brass hose barbs onto the glass. This makes a way to actually connect the hose to the mouthpiece and the base. Start by getting the Gorilla Epoxy and mixing some of it together. You only need a small amount so don’t squeeze out the whole tube.
For the mouthpieces I just flipped them upside down on the table. Apply some glue to the threaded part of the brass hose barb then drop them into the hole of the mouthpiece. I like to spin them a few turns just so the glue spread around the hole. Move those aside and don’t touch them for at least 4 hours so they can harden.
The base is a similar but you need to tape the barbs in place or they will tilt or move out of the hole. Same as above, apply the epoxy around the threaded part of the brass hose barb and slip them into the holes. Now grab some tape and temporarily tape them into position so they don’t move around while hardening. Move this away for at least 4 hours.
I asked the Gorilla Glue people about it being toxic and they said its non-toxic after it has dried/hardened. Just a FYI since I found that out.


Making the Stem

Start by getting the Patron cork for the bottle. Use a normal 3/8″ drill bit to drill a hole directly through the center. This will be for the copper tubing. Now grab the #10 Cork and do the same.

Grab the spool of 3/8″ copper tubing. We need to guess the length of how much to cut so insert the end into the patron bottle and see the length you need. Remember add the height of the Patron cork and the #10 cork since the tubing will have to run to the top of those when the cork is on the bottle. Mine ended up being 9.5″ long. Its better to have extra then redo it all if it’s too short. Grab your copper tube cutter and cut the tubing then try to straighten it out if it was in a coil.


Putting Most of it Together

Were getting close to finishing.  At this point we should have about everything complete except for the hose tubing/cover. Lets get it together.

  1. Grab the cut to size copper tubing and slip the Patron cork on.
  2. Slip the hookah tray on top of that.
  3. Slip the #10 cork with the smaller side to the top.
  4. Insert this stem into the Patron bottle, you may have to slide everything up or down to get it all lined up. The copper tubing should have decent gap between the bottom of the bottle and the top of the copper tube should be about flush with the #10 cork. Cut down the copper tube if it’s too long or redo if it’s too short.
  5. Grab the lime green hookah bowl and push that on top of the cork.
  6. Double check everything and make sure the stem fits firmly together and the bowl is not too loose at the top.

Your almost done. Now comes the worst part..

Sewing Velvet and Making the Hose

This is always the part that takes forever. If you never really sew but you have access to a sewing machine make sure to YouTube how to do it or spend forever with tons of string everywhere. I never tried by hand but that seems bad too. Try and find someone to do this part for you!

I couldn’t find the lime green velvet at the local crafts store so I ordered mine off eBay. Its pretty cheap. You have to buy per yard and only need a long strip so you’ll have plenty of extra left over.

Unroll the fabric. Now get the ruler and mark 3 inches across the whole yard. The strip will be 3 inches x 1 yard (3 feet). At that size it fits nicely with a little slack. Some people suggested to maybe be a little thicker like 4 inches and longer so that the hose has a more baggy look. Which ever size you want, start cutting your strip.

Now that you have your strip, your ready to get sewing. I don’t know what all the dials and buttons do on the sewing machine so I picked one that looked like a straight line and a bunch of dots… Start by folding the strip in half with the velvet part on the inside, basically to sew it inside out which would hide the seam. Stick it in the sewing machine and go along the whole strip.


Now another hard part. The strip is inside out so you have to turn it inside out and its a little hard since its like inch by inch. Once you do that your hose is about ready to go.


Grab your clear vinyl tubing and cut 2 x 5 ft pieces  You can make them longer, I like 5 ft since its half of the 10 ft package I picked up. Slip this through the velvet strip.

Make sure you’ve waited at least 4 hours. I would recommend just letting it harden over night just in case.  Now attach one end of the hose to the barb of the Patron bottle and the other side to the barb of the mouthpieces.

Your Done!


You finished your 2-hose Patron Hookah!!! Go try it out.

Thanks for checking out my How-To. If you make your own or some variation please share them, always cool to see other people’s work. Also check out my previous posts to see other bottles I’ve tried out.

Don’t lose those corks for the mouthpieces! Another mod would be to add a relief valve so that you can clear the hookah because if  you tried just right now, it would shoot water up the copper tubing and into the bowl. The relief valve can just be another brass barb into the base with a cap and you just uncap to clear the hookah.

Leave a comment

3d printed mounting brackets

Got some time to play with the 3d printer some more. Its working good for small items so decided to print a few brackets for a hacked up laptop to use as a media player in my kitchen.

The laptop someone gave me like 6 years ago. It had a broken power connector and I got impatient taking it apart and ended up breaking most of the stuff so I had ended up soldering the power supply and then just flipping the LCD and gluing it all together. It works and kind of has a tablet feel haha.

Design was pretty simple in OpenSCAD. I’d post them but seems like a waste since no one would use them.

IMG_0689.JPG IMG_0691.JPG

IMG_0693.JPG IMG_0699.JPG

The setup works pretty good and now I don’t need to keep hooking up a tablet or someones phone for music.

Leave a comment

Printrbot Finally Running

After months of waiting, I finally got my Printrbot LC from the Kickstarter campaign. It definitely takes a while to build and have to watch tons of YouTube build videos since there wasn’t any written instructions but it’s running. I picked up the power supply enclosure and holds the filament pretty good on bearings which solves my issue of spools rolling around the floor haha plus it looks really nice.

All my batches so far have been pretty bad but its getting better tuning in all the settings. It’s still not as good as the Prusa Mendal I had earlier in the year but hopefully it gets to that.

Now, time to start printing enclosures and random stuff I’ve been needing! PS. LaserCut stuff is really awesome.



Leave a comment

Picked up an Arduino Uno Ethernet

I’ve been wanting to do a project with arduino and an Ethernet shield so finally picked up an Arduino Uno Ethernet. Basically smaller and all one unit. Got this at

Planning on a garage door monitor and controller to my home server with PHP. I have a bad habit of leaving my garage open over night and/or being lazy to go over and checking.



Awesome Liquor Bottle Hookahs

Last month I saw a pic of some awesome looking hookahs made out of liquor bottles. Started checking them out and they looked pretty simple to knock out with parts from Home Depot. I actually had a bunch of stuff from left over test parts on the Bar machine so worked out.

Instead of a normal hookah hose, they’re the mini shot version of the bottle with a clear tubing hose covered in velvet.

This is an X-Rated 750ml. At first had a normal hookah hose since was having a hard time finding the mini’s for the mouth piece but finally got it.


Crystal Head 750ml

2012-04-19 11.33.47.jpg

Casadorez 750ml

2012-03-31 15.18.59-1.jpg

Check out my hookah gallery for pics during the making of them. Next I have a big 1.75ml Patron bottle that I’m going to do 2 hoses on. I’ll write up a build post for that one probably this week sometime. Here is the bottle that’s finally empty.

2012-04-19 15.31.09.jpg