Jump to content

Checking for call drop, call finished.


Recommended Posts

Now we have established what the 'While 1' part of While 1, WEnd is for, here is a bigger question:

Suppose one has a script to automate an application, Skype.

Suppose it has Skype do a number of things, like dial out to a teleconference board.

WHILE Skype is dialled into the teleconference board, the script must increment a Progress meter. (this part is sorted out it seems).

IF the call is normally FINISHED ($oCall.Status = $cCallStatus_Finished), then the script must turn back on some computer services which were off for the duration of the call (to avoid audio glitches and other interference).

IF the call is DROPPED, then the script must redial into the conference.

In this man's mind, the script does a normal 1, 2, 3, .. steps in preparation for the call, including initial dialling.

It is after dialling in, the script must be able to continuously monitor and react depending on the situation.

It's not clear if the converted call.vbs script posted earlier (see the other post), using

While $oCall.Status <> $cCallStatus_Finished
...

and

While $oCall.Status = $cCallStatus_Finished
...

(I added the above)

.. is what the WHILE statements are for?

In the first WHILE, the Progress counter increments when the call is not finished (in progress)..

In the second WHILE, when the call is FINISHED, some other stuff happens (clean-up).

It would be good practice to add an instruction so if the call is dropped, the script redials and re-enters Skype into the conference. (call dropped, redialling).

? thanks.

Edited by scriptstopper

don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Link to comment
Share on other sites

Haven't read your previous post but I would do it this way (pseudocode). Keep the loop simple and place everything you need into different functions:

Init_Conference()
While 1=1
 If $oCall.Status = $cCallStatus_Finished then ExitLoop
 If $oCall.Status = $cCallStatus_Dropped then Init_Conference()
 DisplayMeter()
Wend
End_Conference()

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

It's a little more complicated than that.

Here, based on the example given:

Init_ConferenceCallSetup() ; pre-call setup: skype, recorder, network, etc
Init_Conference() ; call the conference board, which is a simple one-line step: $oCall = $oSkype.PlaceCall($oUser.Handle)
While 1=1
 If $oCall.Status = $cCallStatus_Finished then CallFinished() ; if the call is finished, then the conference host has normally ended the conference. There is some clean-up to be done, resetting computer settings, etc.
 If $oCall.Status = $cCallStatus_Dropped then Init_Conference() ; just $oCall = $oSkype.PlaceCall($oUser.Handle)
; DisplayMeter() ; no there is no meter here, as the script which is doing the checking of the call does not increment the meter...
; the meter is part of the InProgress script, which hasn't been touched on... yet.
 If $oCall.Status = $cCallStatus_InProgress then CallInProgress() ; runs the meter
Wend
End_ConferenceCallCleanup() ; This is what needs to take place post-call. Various computer settings must be reset.

don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Link to comment
Share on other sites

So, everything is running fine now or are there still some problems waiting to be solved?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

http://www.autoitscript.com/forum/index.php?showtopic=120166&st=0&p=834900&#entry834900

Thar's the 'finished' script.

Although yeah "Are there some problems (yet) to be solved" YES, now that you ask (ha ha ha ha).

To test the script for network outtages, I pulled the ethernet cable out of the computer.

Skype faltered, but did not fail until a good 15-20 seconds when it finally disconnected.

Instead of being detected as a Call Failure, it was detected as Call Finished, and so the script completes exactly as if the Host had done a normal conference call completion (you can test this with a Skype-to-Skype call, which is what I did from one computer to another).

However, the local Skype client emitted a sound indicating call failure. So there is something the client is aware of which is not being transferred into the script.

Any ideas?

Here is the new question thread:

http://www.autoitscript.com/forum/index.php?showtopic=120326

Edited by scriptstopper

don't think i'm a freeloader. your help has been effective! here's the script contributed - thank you creator and thank you members and thank you authors of autoit!Call Conference Dial-in Script updated from time to time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...