Beruflich Dokumente
Kultur Dokumente
I needed an automated SIP client, and preferably one with media (audio)
support as well. Couldn't find one that was effective or easy to set up. So I
came up with writing a wrapper to X-Lite and eyeBeam SIP clients through
GUI automation. You can automate this by executing a sequence of
commands with the script below.
The script below does require you to install the AutoItX automation library to
work. Or re-write in C++ or AutoIt script to make into standalone executable.
I'm providing this "as is", with no support.
If args.Count = 0 Then
displayInfo
Set args = Nothing
WScript.Quit(0)
End If
Case "-help"
displayUsage
Case "-hold"
ibeambot.Send "^o" 'Ctrl+o
Case "-ignorecall" 'softkey in eyeBeam display
'works like "send to voicemail" on Wave (Office mode)
ibeambot.Send "^i" 'Ctrl+i
Case "-line" 'select line 1-6
ibeambot.Send "^" & args(1) 'Ctrl+number
Case "-mute" 'mute on/off
ibeambot.Send "^m" 'Ctrl+number
Case "-offhook"
ibeambot.Send "{ENTER}" 'get dial tone, can start dialing
Case "-onhook"
ibeambot.Send "^h" 'Ctrl+h
Case "-open" 'open eyeBeam
Dim shell
Set shell = WScript.CreateObject("WScript.Shell")
shell.Run(args(1))
Set shell = Nothing
Case "-playwav" 'play a Wave file
'assumes that on the computer running eyeBeam/X-Lite audio
'out is looped back to audio in or microphone input, to be
'transmitted to other end of SIP call.
Dim shell
Set shell = WScript.CreateObject("WScript.Shell")
'''Helper methods'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub displayInfo
WScript.Echo "ibeambot.vbs - eyeBeam Command-Line Automation
Interface"
WScript.Echo "--------------------------------------------------------"
WScript.Echo "Version 1.0, July 25, 2007."
WScript.Echo "Requires AutoIt automation program installed. See
documentation."
WScript.Echo ""
WScript.Echo "For automating eyeBeam v1.1, v1.5, and X-Lite v3.0"
WScript.Echo "Designed to automate one instance of eyeBeam per desktop
only."
WScript.Echo "You can automate 1+ eyeBeams via use of psexec, or psexec
& Remote Desktop."
Sub displayUsage
Dim tab
'tab = Chr(9)
tab = " - "
displayInfo
WScript.Echo "Usage details:"
WScript.Echo "--------------"
WScript.Echo ""
WScript.Echo "cscript ibeambot.vbs -actionOption [data] [-ver] [verData]"
WScript.Echo ""
WScript.Echo tab & "[data] may be required or optional depending on the
action to perform. See action options below."
WScript.Echo tab & "[-ver] is optional & specifies which version of eyeBeam
is being used, which requires [verData] parameter"
WScript.Echo tab & "[verData] is required only if [-ver] is used."
WScript.Echo tab & "valid values are ""1.1"" (default), ""1.5"", and ""xlite"""
WScript.Echo ""
WScript.Echo "Action options:"
WScript.Echo "---------------"
WScript.Echo ""
WScript.Echo "?" & tab & "display help or usage information"
WScript.Echo "bancall" & tab & "ban current incoming call, see eyeBeam
v1.1 manual for details"
WScript.Echo "call [dial string]" & tab & "call the number specified by the
dial string, or currently dialed digits if dial string not supplied."
WScript.Echo "close" & tab & "close eyeBeam application"
WScript.Echo "conf" & tab & "toggle conference on/off"
WScript.Echo "dial [digits]" & tab & "dial valid DTMF digits 0-9,*, and #"
WScript.Echo "detectmwi" & tab & "detects message waiting indicator.
Returns 1 if found, or 0 if not."
WScript.Echo "dnd" & tab & "toggle DND"
WScript.Echo "exit" & tab & "close eyeBeam application"
WScript.Echo "flash" & tab & "press Flash. See ibeambot doc for details."
WScript.Echo "h" & tab & "display help or usage information"
WScript.Echo "help" & tab & "display help or usage information"
WScript.Echo "hold" & tab & "toggle call hold"
WScript.Echo "ignorecall" & tab & "use eyeBeam softkey to ignore incoming
call"
WScript.Echo "line [1-6]" & tab & "select a line from 1 to 6. X-Lite only has
lines 1-2."
WScript.Echo "mute" & tab & "toggle mute"
WScript.Echo "offhook" & tab & "go offhook (though not literally for SIP
client) to get dial tone & begin dialing"
WScript.Echo "onhook" & tab & "go onhook (end call or cancel current
action)"
WScript.Echo "open [path to executable]" & tab & "open eyeBeam/X-Lite
application, if not already open"
WScript.Echo "playwav [path to wave file]" & tab & "plays a wave file as
audio coming out of eyeBeam/X-Lite. See ibeambot doc for details."