Fileserver

halsey# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0        9.6G   2.8G   6.8G    30%    /
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   849M   644K   849M     1%    /etc/svc/volatile
/dev/dsk/c0d0s4        9.6G    77M   9.5G     1%    /var
swap                   849M     8K   849M     1%    /tmp
swap                   849M    24K   849M     1%    /var/run
data                   919G    49K   919G     1%    /data
halsey# uname -a
SunOS halsey.home.room17.com 5.10 Generic_118855-14 i86pc i386 i86pc

perl code snipet for issuing POST

This took way to long to lookup how to do.

This issues a POST command to a cgi ($url), fetches the resulting content back and then parses the XML data.


use XML::Simple;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);

my $ua = LWP::UserAgent->new;

my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content("Mac_Id=$mac");

my $res = $ua->request($req);
my $xml = $res->content;

# Parse cfgdata
my $xsl = XML::Simple->new();
my $config = eval { $xsl->XMLin($xml)} ;
if($@) { # bad XML
print "Invalid XML for $mac\n";
print ERROR "Invalid XML for $mac\n";
next;
}

Trixbox Issues

1. The Web GUI can’t read /var/run/asterisk/asterisk.ctl, chmod 777 fixes
2. System Recordings can’t copy files to the /var/lib/asterisk/sounds/custom/ directory. Not sure the root cuase, but the recorded wav files are /tmp/EXT-ivrrecording.wav where EXT is the extention that dialed *77

Cheap second line – SIPPhone.com

So I’ve been wanting to find a cheap second phone line I could use for the Republican Liberty Caucus. At first I was going to go with FreeWorldDialup and LibreTel for a sip service and DID number, but it turns out LibreTel isn’t selling lines anymore. Bummer.

Then I found SipPhone. They are another SIP PC-to-PC calling service, but they offer DID (Direct Inward Dialing) numbers for $12 per 3 months. At $4/mo that was even cheaper that LibreTel. You can also buy dial-out minutes, however I don’t see the need as I’ve got my ViaTalk line for that.

UPDATE: Turns out I mis read the FAQ for SIPPhone. You can’t set a custom VM greeting. Kind of a PAITA since thats what I wanted the line for. Oh well Cavaet Emptor….

Cisco 7960 and ViaTalk

So I wanted to get a BYOD voip provider to move my vongage line to. One of the guys at work sent me a referral from ViaTalk. For $200 I get 2 years of service for about $16/mo. Unlimited minutes, voicemail, etc.

Well, when I tried to configure ViaTalk on the Cisco 7960 (firmware 8.3) the phone would lock up after about 12 minutes and require a powercycle to reboot. Not good. After rerouting and rewiring my network so I could ngrep the sip traffic, I discovered a large number of OPTIONs messages going to my phone. Could these OPTIONS messages be filling up a buffer causing the crash? My ETV line didn’t send lots of OPTIONS, nor did FWD or FONC.

I did some poking around and discovered Cisco has a new firmware version (8.4) out that fixed a bug titled “Phone may crash due to freeing message twice”. Sounds like what might be happening, so I upgraded my phone to 8.4.

That fixed ViaTalk. Unfortunately it broke ETV. Earthlink’s service uses port 5161 for SIP signaling, while most other VOIP services use 5060 (Vonage softphone uses 5061). Running ngrep I discovered that firmware v8.4 will send the REGISTER to the proxy_port specified in the config, however INVITEs are sent to port 5060. Since ETV doesn’t listen on port 5060 my INVITEs were getting dropped on the floor.

Might as well show my proxy configs for both lines:

line1_shortname: “ViaTalk”
line1_name: “16785551212”
line1_authname: “16785551212”
line1_password: “XXXXXXXXXX”
line1_displayname: “Chris Farris”
line1_contact : “UNPROVISIONED”
proxy1_address: “richmond-1.vtnoc.net”
proxy1_port: “5060”

line2_shortname: “ETV”
line2_name: “+16785551234”
line2_authname: “6785551234”
line2_password: “XXXXXXXXXX”
line2_displayname: “Chris Farris”
line2_contact : “UNPROVISIONED”
proxy2_address: “209.165.65.4”
proxy2_port: “5161”

So it seems clear that version 8.4 of the Cisco firmware will send line 2’s INVITEs to the proxy1_port. That’s annoying, as I do need to be able to dial out on my ETV line for testing. I’ve heard some rumors that the 8.x series of firmware is majorly b0rked so I may try to backtrack to 7.4 to see if I can get ViaTalk and ETV working together on the same phone.

Voip Services

Neat-o service that will give me a real phone # for FWD (and maybe other services)
http://www.libretel.com/

Also, this BYOD provider has been recommended to me:
ViaTalk.com

Geek to do

List of geek projects:

Rebuild my MythTV box using 0.20 and fixing some of the DB issues.
Rebuild Halsey to raid 1 the two 250GB drives and dump mp3s and system backups to the 300GB USB disk (or yank the old DDT drive)
Get rid of old computer crap on Craigslist
Write Legifax
Work on the SIP directory for the 7960 phones.
Find a BYOD SIP provider, port vonage #
Build an Asterisk Box, grok it
Build a SER box, grok it.
Get a 2M, join Gwinnett ARES before the Zombie War begins.

Yet another Blog

So I’ve created this blog for two purposes. The first is a test bed to play with different wordpress themes and plugins. The second is to provide an easy way to post geek related stuff I do and have it indexed by search engines in the hopes of providing help to others who might be doing similar weird things with technology.

Don’t expect frequent updates or techno-philosophical discussions. The latter will get posted to Vital Powers.