Skype4COM: Conference.vbs

Skype4COM

Conference.vbs

This script creates a conference call.

Copyright � 2004-2006 Skype Limited. Licensed under BSD license.

'// Create a Skype4COM object:
Set oSkype = WScript.CreateObject("Skype4COM.Skype", "Skype_")

'// Start the Skype client:
If Not oSkype.Client.IsRunning Then oSkype.Client.Start() End If

'// The PlaceCall command will fail if the user is offline. To avoid failure, check user status and change to online if necessary:
If oSkype.Convert.TextToUserStatus("OFFLINE") = oSkype.CurrentUserStatus Then 
  oSkype.ChangeUserStatus(oSkype.Convert.TextToUserStatus("ONLINE")) 
End If  

'// To create a conference call, use the PlaceCall command and add multiple users to the list of targets (to the maximum number of conference users supported by the OS environment):
Set oFirstCall = oSkype.PlaceCall("skypeuser1", "skypeuser2")
WScript.Sleep(30000)  

'// The AttachmentStatus monitors and returns call status:
Public Sub Skype_CallStatus(ByRef aCall, ByVal aStatus)
  WScript.Echo ">Call " & aCall.Id & " status " & aStatus & " " & oSkype.Convert.CallStatusToText(aStatus)
End Sub

'// The AttachmentStatus event handler monitors attachment status and automatically attempts to reattach to the API following loss of connection:
Public Sub Skype_AttachmentStatus(ByVal aStatus)
  WScript.Echo ">Attachment status " & oSkype.Convert.AttachmentStatusToText(aStatus)
  If aStatus = oSkype.Convert.TextToAttachmentStatus("AVAILABLE") Then oSkype.Attach() End If
End Sub

Copyright � 2006 Skype Limited. All rights reserved.