Posts

Showing posts from February, 2010

Troubleshooting Cisco/Linksys SPA-942 phones with a syslog Server

Image
Chances are you're using an Asterisk server on Linux with your SPA-941, SPA-942, or SPA-962 VoIP phones. If you're having an issue, like trouble upgrading firmware it's nice to know what the phone is saying. Simple. Enable remote syslog logging: On your Linux machine, in this case CentOS, enable remote syslog logging in /etc/sysconfig/syslog by adding a -r to the SYSLOGD_OPTIONS line. It will end up looking something like this: SYSLOGD_OPTIONS="-r -m 0" Restart syslog ( /etc/init.d/syslog restart ) and then onto the phone. Enable Logging on the SPA device On your SPA device under (Admin -> System) enter the IP of your syslog server into the boxes and set a debug level (0 is off, 3 is most verbose): Look at your logs: In /var/log/messages you should see some output the phone is putting out. This is an example of a successful firmware upgrade on an SPA-941 Feb 25 13:06:18 10.0.22.114 SPA-941 00:0e:08:23:15:2c -- Requesting upgrade http://10.0.22....

Batch convert Asterisk GSM WAV files to mp3

Image
I am working on a fun project at work to provide web based visual voice-mail for a ticketing system. I realized Flash audio players are not able to play WAV files so had to work around that. Since users are also using voicemail files in other ways I can't just change the output format from Asterisk. The type of file that I'm working with is identifed with file ms0012.WAV as: msg0012.WAV: RIFF (little-endian) data, WAVE audio, GSM 6.10, mono 8000 Hz First I'll say that I found this post http://www.thiscoolsite.com/?p=73 but like some of the commenters I couldn't get the script to work. The author assumes some other format than Asterisk spits out by default. Lame would complain that Unsupported data format: 0x0031 The Tools Sox: http://sox.sourceforge.net/ Lame: http://lame.sourceforge.net/ So here's what I do: Convert GSM encoded wav to Microsoft PCM sox msg0012.WAV -s msg0012.wav Convert the PCM wav to mp3: lame msg0012.wav msg0012.mp3 And here's a script to...

Delete multiple files in Subversion (Linux)

Removed a ton of files from an SVN repo? This will delete all the files that show up with a ! when you do svn status. svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' ) Thanks to Snippler for the snippet.