Super-geeky from the day job

Just in case anyone is trying to do this– we have Snom320 phones in the office, and we wanted to dial from our desktops (using, for instance, copy-paste), rather than having to pick up the phone and transcribe a number from the contact list to the phone. This is a simple way to do it, but it’s not fool proof, and relies on your dialplan being somewhat smart about being given random strings of digits, but it works for us.


REM Don't Edit any of this!
echo %* | "C:\Program Files\GnuWin32\bin\sed.exe" -e "s/[^0-9]//g” > C:\WINDOWS\Temp\number.txt
set /P NUMBER= < c:\windows\temp\number.txt


REM Edit the IP Address to match your phone's
"C:\Program Files\wget\wget.exe" "http://x.x.x.x/command.htm?number=%NUMBER%"

Requires having sed and wget installed. We’re using launchy to run the above code as a batch file named dial.bat, so you type <alt+space>dial<tab>phone-number<enter> and your phone dials like magic. The sed command strips out anything that isn’t a number, and then loads it into the %NUMBER% variable — if anyone has a better way to do this (that doesn’t involve temp files) please let me know.

Also, the blog entry seems to be adding some extra linefeeds– the first block of code, has only two commands, one starts with “echo” the other starts with “set”, the second block of code is only one command, the “C:\Program…” bit

Leave a reply