From: virals at meditab dot in
Operating system: windows xp
PHP version: 5.2.1
PHP Bug Type: COM related
Bug description: skype dll problem Skype4COM.dll
Description:
------------
i have downloaded the skype free Skype4COM.dll and using it through the
com object the code is also available on skype developer zone.
Reproduce code:
---------------
<?php
set_time_limit(0);
// Event sink:
class _ISkypeEvents {
function AttachmentStatus($status) {
echo ">Attachment status $status\n";
}
function CallStatus($call, $status) {
echo ">Call $call->id status $status\n";
}
}
// Create a Skype4COM object:
$skype = new COM("Skype4COM.Skype");
// Create a sink object:
$sink =& new _ISkypeEvents ();
$sink->convert = $skype->convert();
// Connect to the sink:
com_event_sink($skype, $sink, "_ISkypeEvents");
// Create a conversion object:
$convert = $skype->convert;
$convert->language = "en";
// Start the Skype client, minimized and with no splash screen:
if (!$skype->client()->isRunning()) {
$skype->client()->start(true, true);
}
// If the user status is not "online", change user status to "online":
if ($skype->currentUserStatus() == $convert->textToUserStatus("OFFLINE"))
{
$skype->changeUserStatus($convert->textToUserStatus("ONLINE"));
}
// Create a user object
$user = $skype->user("viral2583");
echo "User " . $user->handle . " online status is " .
$convert->onlineStatusToText($user->onlineStatus) . "\n";
// Place a call
$call = $skype->PlaceCall($user->handle);
// Wait for the call to be "in progress" and report an error if:
while ($call->status <> $convert->textToCallStatus("INPROGRESS")) {
if ($call->status == $convert->textToCallStatus("FAILED") ||
$call->status == $convert->textToCallStatus("REFUSED") ||
$call->status == $convert->textToCallStatus("CANCELLED") ||
$call->status == $convert->textToCallStatus("FINISHED") ||
$call->status == $convert->textToCallStatus("BUSY"))
die ("Call status " . $convert->callStatusToText($call->status));
else
com_message_pump (500);
}
// Send dtmf tones:
com_message_pump (10000);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "0";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "1";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "2";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "3";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "4";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "5";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "6";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "7";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "8";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "9";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "#";
com_message_pump (500);
if ($call->status == $convert->textToCallStatus("INPROGRESS"))
$call->dtmf = "*";
// Finish the call:
if ($call->status <> $convert->textToCallStatus("FINISHED"))
$call->finish();
//Sleep:
com_message_pump (1000);
?>
Expected result:
----------------
it should call the phone if skype is running on system.
Actual result:
--------------
Fatal error: Uncaught exception 'com_exception' with message
'<b>Source:</b> Skype4COM.Skype.1<br/><b>Description:</b> Wait timeout.'
in D:\www\call1.php:41 Stack trace: #0 D:\www\call1.php(41): unknown() #1
{main} thrown in D:\www\call1.php on line 41
--
Edit bug report at http://bugs.php.net/?id=40478&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40478&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40478&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40478&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40478&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40478&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40478&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40478&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40478&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40478&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40478&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40478&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40478&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40478&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40478&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40478&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40478&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40478&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40478&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40478&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40478&r=mysqlcfg