X-lite Wrapper AutoIT
Transcript of X-lite Wrapper AutoIT
-
8/10/2019 X-lite Wrapper AutoIT
1/9
Posted 30 July 2007 - 09:35 PM
I needed an automated SIP client, and preferaly one !it" media #audio$
support as !ell% &ouldn't (nd one t"at !as e)ecti*e or easy to set up% So I
came up !it" !ritin+ a !rapper to -ite and eye.eam SIP clients t"rou+"
/I automation% 1ou can automate t"is y eecutin+ a seuence ofcommands !it" t"e script elo!%
4"e script elo! does reuire you to install t"e utoIt automation lirary to
!or6% r re-!rite in &88 or utoIt script to ma6e into standalone eecutale%
I'm pro*idin+ t"is as is, !it" no support%
'''Main Pro+ram "ere''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
im ar+s, ieamot, ret;al
Set ar+s < =Script%r+uments
If ar+s%&ount < 0 4"en
displayInfo
Set ar+s < >ot"in+
=Script%?uit#0$
@nd If
Set ieamot < =Script%&reateAect#utoIt3%&ontrol$
ieamot%utoItSetption Mouse&oordMode, 0
ieamot%=incti*ate eye.eam,
'ieamot%=in=aitcti*e eye.eam, , B5
ieamot%=incti*ate -ite,
-
8/10/2019 X-lite Wrapper AutoIT
2/9
'ieamot%=in=aitcti*e -ite, , B5
Select &ase ar+s#0$
&ase -C
displaysa+e
&ase -ancall 'soft6ey in eye.eam display
'!or6s li6e send to *oicemail all t"e time until un-anned
'"o! to un-anC lso not a*ailale on -ite
'left-clic6 mouse D .an soft6ey once, Einstantaneously
ieamot%Mouse&lic6 left, F25, BBB, B, 0
&ase -call 'ma6e a call
If ar+s%&ount < B 4"en
ieamot%Send G@>4@H 'enter to call
@lse
ieamot%Send ar+s#B$ 'dial numer
ieamot%Send G@>4@H 'enter to call
@nd If
&ase -close 'close eye.eam
ieamot%Send '&trl8
&ase -conf 'conference onKo) - see eye.eam *B%B manual
ieamot%Send n '&trl8n
&ase -dial 'dialKpress 4ML di+its
ieamot%Send ar+s#B$
&ase -detectm!i
'detect Messa+e =aitin+ @n*elope icon 8 of messa+es in ;M
'left-clic6 mouse D M=I icon, Einstantaneously
-
8/10/2019 X-lite Wrapper AutoIT
3/9
ieamot%Mouse&lic6 left, 3B5, BFF, B, 0
ret;al < ieamot%=in=aitcti*e#Messa+es =aitin+, , 5$
If ret;al < B 4"en
ieamot%Send G@>4@H
=Script%@c"o M=I detected
@lse
=Script%@c"o M=I not detected
@nd If
Set ar+s < >ot"in+
Set ieamot < >ot"in+
=Script%?uit#ret;al$
&ase -dnd
ieamot%Send d '&trl8d
&ase -eit 'close eye.eam
ieamot%Send '&trl8
&ase -Nas"
'left-clic6 mouse D Llas" utton once, Einstantaneously
If ar+s%&ount O 2 4"en
If ar+s#B$ < -*er nd #ar+s#2$ < lite r ar+s#2$ < B%5$ 4"en
ieamot%Mouse&lic6 left, 3B, 23Q, B, 0
@nd If
@lse
ieamot%Mouse&lic6 left, 300, 23Q, B, 0
@nd If
&ase -"
displaysa+e
-
8/10/2019 X-lite Wrapper AutoIT
4/9
&ase -"elp
displaysa+e
&ase -"old
ieamot%Send o '&trl8o
&ase -i+norecall 'soft6ey in eye.eam display
'!or6s li6e send to *oicemail on =a*e #Rce mode$
ieamot%Send i '&trl8i
&ase -line 'select line B-Q
ieamot%Send ar+s#B$ '&trl8numer
&ase -mute 'mute onKo)
ieamot%Send m '&trl8numer
&ase -o)"oo6
ieamot%Send G@>4@H '+et dial tone, can start dialin+
&ase -on"oo6
ieamot%Send " '&trl8"
&ase -open 'open eye.eam
im s"ell
Set s"ell < =Script%&reateAect#=Script%S"ell$
s"ell%Hun#ar+s#B$$
Set s"ell < >ot"in+
&ase -play!a* 'play a =a*e (le
'assumes t"at on t"e computer runnin+ eye.eamK-ite audio
'out is looped ac6 to audio in or microp"one input, to e
'transmitted to ot"er end of SIP call%
im s"ell
Set s"ell < =Script%&reateAect#=Script%S"ell$
-
8/10/2019 X-lite Wrapper AutoIT
5/9
'launc" =indo!s Sound Hecorder to play (le t"en close on completion
s"ell%Hun#sndrec32 Kplay Kclose ar+s#B$$
Set s"ell < >ot"in+
&ase -uit 'close eye.eam
ieamot%Send '&trl8
&ase -record 'record audio to (le onKo) to++le
'left-clic6 mouse D Hecord utton once, Einstantaneously
If ar+s%&ount O 2 4"en
If ar+s#B$ < -*er nd #ar+s#2$ < lite r ar+s#2$ < B%5$ 4"en
ieamot%Mouse&lic6 left, 33Q, 20F, B, 0
@nd If
@lse
ieamot%Mouse&lic6 left, 33F, 23Q, B, 0
@nd If
&ase -redial
ieamot%Send r '&trl8r
&ase -ferlind 'lind transfer
ieamot%Send t '&trl8t, initiate lind fer
ieamot%Send ar+s#B$ 'dial numer of fer tar+et
ieamot%Send t '&trl8t, complete lind fer
'c"ec6 display area if "a*e ms+ t"at fer failed
&ase -fersup 'super*ised transfer
'assume you "a*e 2 calls in pro+ress, B acti*e, B on "old
'use fer utton to connect B call to t"e ot"er to complete fer
'!it" transfer tar+et as acti*e call
ieamot%Send t '&trl8t, initiate super*ised fer
-
8/10/2019 X-lite Wrapper AutoIT
6/9
ieamot%Send ar+s#B$ '&trl8numer, line of transferee t"at's on
"old
ieamot%Send t '&trl8t, complete super*ised fer
'c"ec6 display area if "a*e ms+ t"at fer failed
&ase -fer*m 'sendKtransfer to *oicemail
ieamot%Send s '&trl8s
default:
=Script%@c"o In*alid parameter#s$, type cscript ieamot%*s -"elp
for usa+e details%
@nd Select
Set ar+s < >ot"in+
Set ieamot < >ot"in+
=Script%?uit#0$
'''Telper met"ods'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Su displayInfo
=Script%@c"o ieamot%*s - eye.eam &ommand-ine utomation
Interface
=Script%@c"o --------------------------------------------------------
=Script%@c"o ;ersion B%0, July 25, 2007%
=Script%@c"o Heuires utoIt automation pro+ram installed% See
documentation%
=Script%@c"o
=Script%@c"o Lor automatin+ eye.eam *B%B, *B%5, and -ite *3%0
=Script%@c"o esi+ned to automate one instance of eye.eam per des6top
only%
=Script%@c"o 1ou can automate B8 eye.eams *ia use of pseec, or pseec
Hemote es6top%
-
8/10/2019 X-lite Wrapper AutoIT
7/9
=Script%@c"o &an e used stand-alone or in conAunction !it" ;4S for
automated testin+%
=Script%@c"o
=Script%@c"o 4ype cscript ieamot%*s -"elp for usa+e details
=Script%@c"o lso refer to t"e ieamot documentation
=Script%@c"o
@nd Su
Su displaysa+e
im ta
'ta < &"r#9$
ta < -
displayInfo
=Script%@c"o sa+e details:
=Script%@c"o --------------
=Script%@c"o
=Script%@c"o cscript ieamot%*s -actionption UdataV U-*erV U*erataV
=Script%@c"o
=Script%@c"o ta UdataV may e reuired or optional dependin+ on t"e
action to perform% See action options elo!%
=Script%@c"o ta U-*erV is optional speci(es !"ic" *ersion of eye.eam
is ein+ used, !"ic" reuires U*erataV parameter
=Script%@c"o ta U*erataV is reuired only if U-*erV is used%
=Script%@c"o ta *alid *alues are B%B #default$, B%5, and lite
=Script%@c"o
=Script%@c"o ction options:
=Script%@c"o ---------------
-
8/10/2019 X-lite Wrapper AutoIT
8/9
=Script%@c"o
=Script%@c"o C ta display "elp or usa+e information
=Script%@c"o ancall ta an current incomin+ call, see eye.eam
*B%B manual for details
=Script%@c"o call Udial strin+V ta call t"e numer speci(ed y t"e
dial strin+, or currently dialed di+its if dial strin+ not supplied%
=Script%@c"o close ta close eye.eam application
=Script%@c"o conf ta to++le conference onKo)
=Script%@c"o dial Udi+itsV ta dial *alid 4ML di+its 0-9,W, and
=Script%@c"o detectm!i ta detects messa+e !aitin+ indicator%
Heturns B if found, or 0 if not%
=Script%@c"o dnd ta to++le >
=Script%@c"o eit ta close eye.eam application
=Script%@c"o Nas" ta press Llas"% See ieamot doc for details%
=Script%@c"o " ta display "elp or usa+e information
=Script%@c"o "elp ta display "elp or usa+e information
=Script%@c"o "old ta to++le call "old
=Script%@c"o i+norecall ta use eye.eam soft6ey to i+nore incomin+
call
=Script%@c"o line UB-QV ta select a line from B to Q% -ite only "as
lines B-2%
=Script%@c"o mute ta to++le mute
=Script%@c"o o)"oo6 ta +o o)"oo6 #t"ou+" not literally for SIP
client$ to +et dial tone e+in dialin+
=Script%@c"o on"oo6 ta +o on"oo6 #end call or cancel currentaction$
=Script%@c"o open Upat" to eecutaleV ta open eye.eamK-ite
application, if not already open
=Script%@c"o play!a* Upat" to !a*e (leV ta plays a !a*e (le as
audio comin+ out of eye.eamK-ite% See ieamot doc for details%
-
8/10/2019 X-lite Wrapper AutoIT
9/9
=Script%@c"o uit ta close eye.eam application
=Script%@c"o record ta to++le eye.eam audio record feature% See
ieamot doc for details%
=Script%@c"o redial ta redial last dialed numer
=Script%@c"o ferlind Udial strin+V ta lind transfer current call to
speci(ed numer% >ot supported on -ite%
=Script%@c"o fersup UlineV ta super*ise transfer current call to
anot"er line #B-Q$, see eye.eam *B%B manual for details% >ot supported on -
ite%
=Script%@c"o fer*m ta send incomin+ call directly to *oicemail of
t"is eye.eam SIP etension
=Script%@c"o
@nd Su