The blog of Michael Rice

7/16/2008

Nokia N95 8GB, Sony Ericsson w580i, Bluetooth & Sharing Ring Tones

Filed under: phones — errr @ 4:01 pm

We happen to have a few cell phones laying around the house. Of course I have my new nokia n95 8gb, we also have the Sony Ericsson w580i, and we have a blackberry pearl that Summer uses. I have been messing around with the n95 and the w580i. I wanted to be able to transfer some ring tones I have been making from the n95 to the w580i. I have never messed with bluetooth before so this was all new to me. I have basically been living in the 1980’s as far as cell phone technology goes for the last 5 or so years.

Getting it going

So first on the Nokia

  • menu
  • tools
  • bluetooth

From the Bluetooth menu:

  • Set bluetooth on
  • My phone’s visibility set to show to all
  • My phones name I set to Mike (since thats my name you can pick any name you wish)
  • Remote SIM mode I have set to off

Next on the w580i open the menu and select settings, then scroll left until you get to Connectivity:

  • Select Bluetooth
  • Turn On
  • Visibility
  • Show Phone
  • My Devices
    • Select Add new device
    • Make sure your n95 is close enough and bluetooth is on
    • Click on “Mike”
    • Passcode: 00000

Now a dialog will open on your n95 asking to allow the connection and to enter the passcode. Enter 00000 and hit OK. Now the 2 devices are connected. In my case I wanted to transfer a ring tone from the n95 to the w580i. So now we need to grab the n95 and open the menu and go to tools, and then file manager. Find the file you want to send. Scroll to the file and click options then send, send via bluetooth, and then select the w580i (which by default is named W580i). Thats it.. super simple. Now you can use this file as a ring tone or text alert or what ever.

7/15/2008

Asterisk Dual Servers with SIP

Filed under: Linux, asterisk, freepbx, phones — errr @ 9:06 am

I have found about a million articles on the net for connecting 2 asterisk boxes using IAX2. What I have not found is many describing how to do this with SIP, so thats what Im going to talk about. Now since I am a FreePBX user I am going to talk about how to do this using the FreePBX web GUI. You can use this method if you use TrixBox, or Elastix, or PBX In A Flash, or if you just use FreePBX with your own distro.

I have 2 systems. To make this simple Im going to call them pbx1 (which for this example is in San Antonio) and pbx2 (which we will pretend is in our Houston office). First we need to log into the web interface on pbx1 and then get to the section where you configure trunks. Click Add SIP Trunk. Im not going to mess with any of the General Settings, or the Dial Rules. I am going to go straight to the Outgoing Rules. In trunk name Im going to call this trunk-hou-peer. Next I jump into the PEER Details box. I put the following into the box:

context=from-internal
host=pbx2.mhipriv.com
secret=strong_password
type=peer
username=trunk-sa-peer

Next, Remove all the settings from the Incoming Section. Hit submit, and then apply the changes.

Next we need to log on the web gui for pbx2. Now we are going to go from Houston back to San Antonio with this trunk. We need to add a new SIP trunk here. Follow the same steps as before, but now name this trunk: trunk-sa-peer You may notice that the name of this trunk is the username we used in the peer details on pbx1. Now in the Peer details on pbx2 add the following:

context=from-internal
host=pbx1.mhipriv.com
secret=strong_password
type=peer
username=trunk-hou-peer

Now you will notice that the username on this peer is what we named our trunk on pbx1. The context used in both is the same. This will give you access from pbx2 to dial an extension that is on pbx1 and vise versa. Now all we need to do is submit this and apply the changes.

Next all we need to do is create an outbound route to use our new trunk. For the sake of keeping it super simple lets assume you have extension 100-199 on pbx1 and 200-299 on pbx2. We need to go to the outbound route section and create a route on pbx1, name it toHouston and it needs a dial pattern that looks like this:

2XX

Click on the Intra Company Route. Then select our Houston trunk. Next submit and apply changes. Now head over to the pbx2 web gui and do the same steps only name this route toSanAntonio and for its dial pattern use:

1XX

Click Intra Company Route select the San Antonio Trunk, hit submit and apply. Now from extension 100 in San Antonio dial 200 and bamo thats it. You can take this a step further and even do toll-by-pass now.

7/10/2008

The best course is to answer No and try again later.

Filed under: Linux, openldap, samba — errr @ 10:28 am

I have been working on a Domain Controller at work using Samba 3.0.28 and openLDAP. I was trying to setup my windows client computers to login then map some drives from various other samba servers we have. My logon.bat file looked like this:

@echo off
REM # SYNC THE TIME WITH THE SERVER
net time \\pdc01.mhipriv.com /set /y
REM # DELETE ALL MAPPED DRIVES
net use h: /delete
net use h: “\\pdc01.mhipriv.com\homes”
net use g: /delete
net use g: “\\server.mhipriv.com\apps”

This was working but causing some weird issues when you would log in from a windows client. I would get this error on windows that said:

There are open files and/or incomplete directory searches pending on the connection to pdc01.mhipriv.com

So I went over to microsoft google and did a search for the error. #1 google result led me here So I am reading and sure enough this is my problem. So then on to the answer.. WTF!!! You mean seriously you want me to wait and try it again.. Im thinking to my self “You have to be fu**ing kidding me” So I wait, and wait, and wait, and then went home for the day and then today I try again and still the same shit. So I decided to find the real solution. What happened is that in my smb.conf I set the logon drive = H: so samba was already mapping it for me and then I was trying to /delete it and then remap it, and somewhere in that process was the problem. All you really need to do is either set

logon drive =

Because the default drive is Z:\ if its not set, or

logon script = logon.bat
logon path = \\%L\PROFILES\%U
logon drive = H:
logon home = \\%L\%U

And make sure your logon.bat looks like this

@echo off
REM # SYNC THE TIME WITH THE SERVER
net time \\pdc01.mhipriv.com /set /y
net use g: /delete
net use g: “\\server.mhipriv.com\apps”

I hope someone out there finds this more useful than the “The best course is to answer No and try again later.” crap answer I found on the M$ site.

7/6/2008

Long Sleeves for life.

Filed under: life — errr @ 3:40 pm

I have been on a bit of a tattoo kick the last 9 months or so. Most of the big stuff I have gotten has been on my right or my left leg. I have some work on my arms but nothing that couldn’t be hidden by a short sleeve shirt. Nothing that is, until last night. I have always wanted to have whats known as a full sleeve on both of my arms. Well we have finally started the one on my left arm. Its going to look so bad ass when its done. Mr. Luckys tattoo in San Antonio is where Im getting the work done. The artist is Weldon Lewis. Its my opinion that he is one of the best tattoo artists in the country. So now that my forearm has been marked for life it looks like I am going to be stuck wearing long sleeves to work from here on out. I see it as a very small price to pay to be able to have some wonderful art on my arms for life.

7/1/2008

My New Cell Phone - Nokia n95 8GB

Filed under: Linux, amarok, asterisk — errr @ 10:53 am

Yeah, hate me.. I got one. Its so freakin awesome. here are a few things that really kick ass so far about this phone:

  • I am able to sync music to the phone via amarok using Linux
  • I am able to browse the web using WIFI or my 3g data service.
  • I have configured my n95 as a sip client and have it registered with my Asterisk server.
  • The phone supports mobile bar codes
  • The camera takes WONDERFUL pictures. The quality is very high!! And you can export them directly to flickr!!
  • The phone takes really great video
  • Did I mention I didnt need windows to add music to this thing??

Im sure there are other really great things about this phone too but I have only had it a couple days so I havent had time to check all the features out yet.

Protected: New Cell Phone Number - password is 10 digit old number

Filed under: General — errr @ 10:35 am

This post is password protected. To view it please enter your password below:


6/11/2008

Why Does Fonality Choose to Deceive You?

Filed under: Trixbox, fonality, freepbx, phones — errr @ 6:39 am

Find the answers to that here

6/10/2008

Back Online

Filed under: General — errr @ 10:19 pm

Well I’m back online after an extended down time. My main computer is dead. It will only run for a few minutes a day (and only on certain days when it feels like running). Tonight I managed to get it to boot and stay running for about 5 minuets before it died, which gave me just enough time to get this backup off that machine and install it on my temp web server. I hope to get a more permanent solution soon. I did go ahead and upgrade my blog to the latest wordpress so maybe it wasnt a total bust?

5/6/2008

The Slip

Filed under: General, music, nin, the slip — errr @ 7:24 am

Well if you didn’t already know Nine Inch Nails has a new cd out. Its called The Slip, and it kicks ass. What makes it even better though, is it’s free!!!

9/17/2007

New iPods Cracked over the weekend

Filed under: amarok, apple, gtkpod, ipod, itunes — errr @ 6:53 am

Thats right folks, they cracked the new iPods over the weekend. This crack went faster than the iPhone. Here is the story. All I can say is that the way open source works is amazing. Just think of how far along we could be in this world technology wise if there werent people wasting their time cracking locked code and everyone could just focus on ways to make it better..

9/14/2007

New IPOD doomed with out iTunes

Filed under: amarok, apple, evil, gtkpod, ipod, itunes — errr @ 12:30 pm

Well it seems you may be doomed to use iTunes for you new iPod. Thanks to apple who seems to have gone out of their way to make the iPod not work with out itunes (according to this fine article). I am one of the poor saps who went and bought not just 1 but 2 of the new iPods. I got a new 80g classic, and a new nano. I sure hope someone is able to get these working in amarok or gtkpod because I HATE USING WINDOWS I have been winblows free for several years but now I had to install it just to get music on our new iPods.

9/4/2007

Cool mushrooms

Filed under: General, mushrooms, nature — errr @ 11:00 pm



00007.jpg

Originally uploaded by the_real_errr

Its been raining a ton here. With lots of rain cool little mushrooms normally grow. I was heading to work today and at the foot of the stairs Were these nifty lookin mushrooms. I have no idea what kind they are but they sure look pretty cool.


9/3/2007

Tubing on the Frio River

Filed under: General, frio river, life — errr @ 1:01 pm



00003.jpg

Originally uploaded by the_real_errr

Yesterday we were sitting around bored trying to decide where we wanted to go get rained on. After a little bit of discussion we decided to go to the Frio River. Its right around a 2 hour drive from our apartment. The original plan was to go to Garner State Park and play in the water or something, but the park was full and they would not let us in. We drove up the road a little further untli we found a good spot to park where we could access the river. We walked down to the river got on our tubes and floated down the river about a mile to this place called Happy Hollow. They charged us 2 bucks for an exit fee then a dollar per person to shuttle us back to our car. This was mine and Aprils first time to ever go tubing. Summer had been several times before. We had a really great time. We got a few pictures of the river (none with us in it though). You can check them out here.


7/22/2007

Tacos anyone?

Filed under: food — errr @ 4:49 pm

We are at work the other day talking about places to go eat. One of the guys, Ben, says how we need to try this place called Rolandos Super Tacos. Based on other reccomendations Ben has made to me like Josephs Bakery (this place kicks major ass!!!) I figured I better give it a try. Ben says how they have these really big tacos and how I might not even be able to eat the whole thing, but that I shouldnt order 2 of them for sure. Today I decided to have Rolandos for breakfast. They open from like 8-3 on sundays I think so I head over there. Its about 13 miles or so from my house but I dont care, its about the same to get to Joesphs too. I get there and its a seat your self place (I dont like that much becuase I hate wondering around looking for a place to sit). I find a seat and someone promptly brings me out a bowl of chips and 3 kinds of salsa. The salsa was hot, hotter, and damn thats freakin hot. All 3 were really really good, and best of all they were served warm (well hot really, right off the stove). I love salsa served this way. Im looking though the menu and I find a taco with my name all over it. I think it was called the Taco Grande. It was a large taco where I got to pick up to 5 or 6 toppings to go in it. I got eggs, bacon, potatoes, sausage, and beans. It only took a few mins to come out. This is what they brought me:

I nearly fell over. I couldnt even pick this thing up. The fork and knife were a must have to eat this giant. This taco kicked major ass and it was really cheap. My total bill with the tip was well under 10 bucks and I tip heavy. If you are in San Antonio I highly reccomend you stop by Rolandos and get you a Super Taco!!!

7/2/2007

My trip to Houston

Filed under: asterisk — errr @ 9:23 pm

Well I just got home from a week long trip to Houston to deploy the last of our PBX servers to complete the rolling out of our new Asterisk phone system. I had a great time there and got to eat at some really good places. Im just glad to be done rolling out the system, next comes the fun part… managing it :) I will do my best to keep you posted from time to time as I hit any snags. I did happen to have one problem with our voicemail system that I will be covering later once I have a more elegant fix for it. It involves being able to hit 0 and get back to an IVR which will allow for direct extension dialing. For now my fix is kinda crappy and only involves hitting 0 and it ringing our operator ring group.

5/13/2007

SUV Ownership rules

Filed under: General, car, gas, truck — errr @ 11:19 am

I was surfing the web and stumbled across this and nearly spit milk out my nose laughing. Check this out. Its almost sad how true this is.

Centralized Voicemail server for multiple Asterisk systems using FreePBX and IAX2

Filed under: Linux, Trixbox, asterisk, phones — errr @ 10:18 am

Well I never really finished up my asterisk tips posts… I’m lazy and most of the free time I do have I dont like to spend on the computer anymore (what can I say). Im going to make it up to you though by sharing with you how to make a very slick asterisk setup.

So why would anyone want to have a stand alone voicemail server anyway?? Well thats pretty simple. Lets pretend you have a small to medium sized company. Maybe 100-500 employees, maybe more maybe less… You have 3 or 4 office locations, they span several cities or maybe even other states.. It doesnt really matter where they are. The important thing is that they all need to be connected. You need to be able to call from one office to another, and at times you will even need to forward voicemails from one location to another. Asterisk does not just automaticly support this. Even if you have routes in place that make it so you can call each person on your network with a SIP call if their voicemail box isnt on the same server as yours you cant forward them a message. This can become a big problem real fast. Infact at our company we were considering not using asterisk because of this. The good news is that its really simple to do.

First off Im not going to cover how to connect the multiple servers. This has been articled to friggin death. Its covered on many sites, one of them not being this one. Next Im going to assume you have figured out how to make connections from 1 asterisk system to another using IAX2. If not please check out this guide. It works great.

Now on to the fun stuff. I used FreePBX on our 3 PBX servers to get our dial plan setup and have a nice easy to manage user interface. I kept thinking that this would keep me from being able to customize my dial plan like i needed to but I was all wrong about that. Im now going to point you over to the guide I followed: Click me!!!

This guide is fairly good. It doesnt cover doing it with FreePBX though. If you use FreePBX you may have found that if you edit one of its config files you lost your changes once you entered the gui, or made an update to FreePBX. I went to the IRC and asked how to get around this. It was simple, at the top of the config files you see a line that says #include somefile_custom.conf All you have to do is edit that custom.conf file and over ride the context you need to edit. So if you have in your sip.conf file a [foo] context you go to sip_custom.conf and make [foo] in there and then the settings for the [foo] context from your sip_custom.conf file will be whats used instead of the [foo] from sip.conf

In the article I asked you to click to see how to do the setup it said you needed to edit a macro in extensions.conf. The context you need to edit is called [macro-vm] First what I did was copy and pasted the [macro-vm] context from extensions.conf and pasted it into extensions_custom.conf then I edited the following:

; over riding the below for our central voicemail server
exten => s-BUSY,n,Dial(IAX2/toVMail/b${ARG1})
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)

exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
; over riding the below for our central voicemail server
exten => s-DIRECTDIAL,n,Dial(IAX2/toVMail/${ARG1})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)

From there I just followed the rest of the guide the other nice fellow provided and saved my settings, then setup a plain jane asterisk server for my voicemail server. I didnt use FreePBX on it at all. Managing that server is braindead simple so I didnt see the need. I hope this little tidbit will help others out there who have to set this up.

4/16/2007

using php mail() with postfix

Filed under: asterisk, mysql, php, postfix, programming — errr @ 5:12 pm

First, let me give a short history… I had to make a script at work that would get fired off by our hylafax server when ever an incoming fax was recieved. This script needed to check the caller id info and see what number was dialed, then based on that either move the file into a dir for the department it was intended for, or if it was ment for a person then to convert the tiff file into a pdf then email them the fax. Sounds simple enough… So for what ever reason my boss is hung up on using php for everything so I start working on this thing in php. We are using asterisk at work with IAXmodem to make asterisk and hylafax work happy like.. We have given all 90+ users we have their own DID as well as their own FaxDID. What I do with this script is lookup the number that was passed with callerid info in a mysql database to see whos umber it is, I get their username and their email as well as some other info, then mail the user the fax. I decided to use Pear for this because I like to reuse code when ever possible. I made a simple script to get the job done and damn to hell if it wouldnt work. I would get an email with the headers all screwed up. I knew they were not getting messed up in the php because I could print the email (headers and all) to the command line and it was perfect. I tried this same script on another box (that happened to have sendmail) and it woked perfect. I spent all damn day trying to figure out why my emails were not being sent correctly today. Then along came my good buddy Caleb. The first words from his mouth were ” I bet the working servers are sendmail and the nonworking are postfix” Sure enough that was the case. For what ever reason postfix is adding 2 new lines to my stuff. The fix was really extremely trivial.

$body = $mime->get();
$body = str_replace(”\r”,”,$body);
$headers = $mime->headers($headers);
$headers = str_replace(”\r”,”,$headers);

The full script can be found here. This script is not the best work ever, and it could be improved for sure. But this is what I am using. I hope someone can find it useful someday.

4/11/2007

Double Damn!!

Filed under: car — errr @ 5:02 pm

Well my car needs a new mass air sensor, and a tune up. $600 later Ill be able to pick it up.. What a flippin rip off man.. Oh well. If I had my tools here and a couple hours to spare on Saturday, and a place to do the work (no auto repairs allowed at the apartments I live in) I would do it my self for under $200 bucks.

4/9/2007

Damn!

Filed under: General, car — errr @ 10:09 pm

So my car has been running kinda rough for a while now and the stupid “Check Engine” light has been on since the day I bought the car. I decided that I should get it fixed before the summer time gets here and the stupid car breaks down on the freeway and leaves me stranded.Now with my new fancy job I dont really have time to screw around with fixing my car my self, and all my tools are still in Odessa because I dont have any where to store the tool boxes. I take the car to a local shop today that was right down the street from my house. Its basicly 1/2 way to my office. I know from having wokred in a shop for most of my working life that getting a car fixed isnt cheap. Infact it can be damn expensive. I told the service writter the symptoms my car had and he told me it would be Wednesday at the earliest before they could look at it. Thats no problem for me since the car does still run it just runs kinda crappy. I set up the apointment and tell them I will be back Wednesday morning on my way to work. He tells me ok and informs me of their service chanrge to “check out” my car. Brace your self folks because I nearly passed out smooth. They have a 1 hour charge to check out the car… at a whopping $84.50. I was like holy shit!! I can recall going to a new doctor for the first time about 18 months ago and not havving health insurance and only paying $90 for the office visit. I mean shit.. the doctor went to college for what.. like 10 years or more, and I pay him $90 and I have to pay some guy who at best has a 2 year degree and most likely just took some test to get a cert like the ASE. Did I give up the being a mechanic at the wrong time.. Our shop charged $57.10 an hour and I thought we were a little on the high end.. but wow these folks may be charging more than the dealer.. I will have to look into it and find out. I do still plan on taking them my car becuase I dont really have time to go out looking for a better deal either, and with me not really having anyone here who can take me around or anything Im just gonna have to spend the money this time.. Ill keep you posted on what ends up being wrong.

Next Page »