How to ring a phone on a 3Com NBX by jgn on Monday, February 11, 2008 in Technology

Since this was so annoying, I must preserve it for posterity. Let us say that your office VOIP system is a 3Com NBX. Wouldn't it be nice to be able to ring an arbitrary phone via software?

Here's one way to do it on Windows. First download 3Com's NBX Desktop Call Assistant. I couldn't find a way to locate this software through 3Com's site, but Google found it. Now find NBXDCA_R6_0_2.exe on the page. Download and install it. After configuration, put it in your Windows startup group. Now you will have a yellow telephone icon in your system tray. If you right-click it, you get a dialog box like so:


Now it would be fun to automate this. The tool I used is autoit3.

Now we need a bit of script magic to dig around in the system tray and click the right thing. I adapted some almost working code, resulting in this:

[source language="vb"] #NoTrayIcon #Include

$dca_title = "Desktop Call Assistant" $number = "1004"

If $CmdLine[0] > 1 Then $number = $CmdLine[1] EndIf

SysTray_ClickItem($dca_title, "right") WinActivate($dca_title) Send("!o" & $number & "!d") Sleep(1500) WinActivate($dca_title) Send("!R")

; code modified from R. Gilman ( Func SysTray_ClickItem($title = "Volume", $button = "left", $num_clicks = 1) Local $toolbar, $num_buttons, $rect, $i

$toolbar = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "No system tray found") Return 0 EndIf

$num_buttons = _GUICtrlToolbar_ButtonCount($toolbar) For $i = 0 To $num_buttons - 1 $cid = _GUICtrlToolbar_IndexToCommand($toolbar, $i) If StringInStr(_GUICtrlToolbar_GetButtonText($toolbar, $cid), $title) Then $rect = _GUICtrlToolbar_GetButtonRect($toolbar, $cid) ControlClick("[Class:Shell_TrayWnd]", "", "ToolbarWindow321", $button, $num_clicks, $rect[0], 1) Return 1 EndIf Next MsgBox(48, "Fail", "Couldn't find '" & $title & "' in toolbar") EndFunc [/source]

comments powered by Disqus