Wenn dir das hier: FbDial.php
<?php
//$fritzbox_Login = '0';
$fritzbox_Login = '1';
// Login Lua 5.29 ab Firmware xxx.05.29 / xxx.05.5x
// Login Xml 5.28 ab Firmware xxx.04.74 - xxx.05.28
//$fritzbox_Version = '5.28';
$fritzbox_Version = '5.29';
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
include "FbLoginSid.php";
include "CurlHttpGetPost.php";
$Dial = '**610'; // set to the number to dial
$DialPort = '50'; // set port from where should be dialed
$UseClickToDial = '1'; // enable ClickToDial at FB
if ($fritzbox_Login >= '1')
{
if ($SID != '0000000000000000')
{
$URL = 'http://'.$fritzbox_Adresse.'/cgi-bin/webcm';
$POST = 'sid='.$SID.'&getpage=&telcfg:settings/UseClickToDial='.$UseClickToDial
.'&telcfg:command/DialPort='.$DialPort
.'&telcfg:command/Dial='.$Dial;
$dummy = http_post($URL, $POST);
}
}
?>
php.exe FbDial.php
FbDialHangup.php
<?php
//$fritzbox_Login = '0';
$fritzbox_Login = '1';
// Login Lua 5.29 ab Firmware xxx.05.29 / xxx.05.5x
// Login Xml 5.28 ab Firmware xxx.04.74 - xxx.05.28
//$fritzbox_Version = '5.28';
$fritzbox_Version = '5.29';
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
include "FbLoginSid.php";
include "CurlHttpGetPost.php";
$UseClickToDial = '1'; // enable ClickToDial at FB
// Hangup Last DialPort
$DialPort = ''; // '50' = set port from where should be dialed
$QueryDialPort = '';
if (!empty($DialPort))
{
$QueryDialPort = '&telcfg:command/DialPort='.$DialPort;
}
if ($fritzbox_Login >= '1')
{
if ($SID != '0000000000000000')
{
$URL = 'http://'.$fritzbox_Adresse.'/cgi-bin/webcm';
$POST = 'sid='.$SID.'&getpage=&telcfg:settings/UseClickToDial='.$UseClickToDial
.$QueryDialPort
.'&telcfg:command/Hangup';
$dummy = http_post($URL, $POST);
}
}
?>
php.exe FbDialHangupp.php
FbLoginSid.php
<?php
//$fritzbox_Login = '1'
$SID = '0000000000000000';
if ($fritzbox_Login >= '1')
{
// Login Lua 5.29 ab Firmware xxx.05.29 / xxx.05.5x
// Login Xml 5.28 ab Firmware xxx.04.74 - xxx.05.28
//$fritzbox_Version = '5.50';
//$fritzbox_Adresse = '';
//$fritzbox_Username = 'ESEL';
//$fritzbox_Password = 'DUESEL';
if ($fritzbox_Version <= '5.28')
{
// Step 1 - Login in die Fritzbox xxx.04.74 - xxx.05.28 (Fritzbox UM 6390 85.05.28)
//$fritzbox_Adresse = '';
//$fritzbox_Password = 'DUESEL';
$ch = curl_init('http://'.$fritzbox_Adresse.'/cgi-bin/webcm');
curl_setopt($ch, CURLOPT_POSTFIELDS, "getpage=../html/login_sid.xml");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$login = curl_exec($ch);
$session_status_simplexml = simplexml_load_string($login);
if ($session_status_simplexml->SID != '0000000000000000')
{
$SID = $session_status_simplexml->SID;
}
else
{
$challenge = $session_status_simplexml->Challenge;
$response = $challenge . '-' . md5(mb_convert_encoding($challenge . '-' . $fritzbox_Password, "UCS-2LE", "ISO-8859-1"));
curl_setopt($ch, CURLOPT_POSTFIELDS, "login:command/response={$response}&getpage=../html/login_sid.xml");
$sendlogin = curl_exec($ch);
$session_status_simplexml = simplexml_load_string($sendlogin);
if ($session_status_simplexml->SID != '0000000000000000')
{
$SID = $session_status_simplexml->SID;
}
else
{
echo "Fehler: Login fehlgeschlagen";
$fritzbox_Login = '0';
return;
}
}
curl_close($ch);
//---
}
else
{
// Step 2 - Login in die Fritzbox xxx.05.50 mit Benutzername
//$fritzbox_Adresse = '';
//$fritzbox_Username = 'ESEL';
//$fritzbox_Password = 'DUESEL';
$ch = curl_init('http://' . $fritzbox_Adresse . '/login_sid.lua');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$login = curl_exec($ch);
$session_status_simplexml = simplexml_load_string($login);
if ($session_status_simplexml->SID != '0000000000000000')
{
$SID = $session_status_simplexml->SID;
}
else
{
$challenge = $session_status_simplexml->Challenge;
$response = $challenge . '-' . md5(mb_convert_encoding($challenge . '-' . $fritzbox_Password, "UCS-2LE", "ISO-8859-1"));
curl_setopt($ch, CURLOPT_POSTFIELDS, "response={$response}&page=/login_sid.lua&username={$fritzbox_Username}");
$sendlogin = curl_exec($ch);
$session_status_simplexml = simplexml_load_string($sendlogin);
if ($session_status_simplexml->SID != '0000000000000000')
{
$SID = $session_status_simplexml->SID;
}
else
{
echo "Fehler: Login fehlgeschlagen";
$fritzbox_Login = '0';
return;
}
}
curl_close($ch);
//---
}
}
?>
CurlHttpGetPost.php
<?php
function http_post($URL, $POST)
{
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_POSTFIELDS, $POST);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$login = curl_exec($ch);
curl_close($ch);
return $login;
}
function http_get($GET)
{
$ch = curl_init($GET);
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$login = curl_exec($ch);
curl_close($ch);
return $login;
}
?>
weiter Hilft, ist zwar Direkt PHP und wird bei mir mit php.exe FbDial.php
im Dos-Fenster ausgeführt, sollte aber auch in IPS gehen, wenn du es Anpasst.
FbDial_Soap.php
<?php
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
$client = new SoapClient(
null,
array(
'location' => 'http://'.$fritzbox_Adresse.':49000/upnp/control/x_voip',
'uri' => 'urn:dslforum-org:service:X_VoIP:1',
'noroot' => True,
'login' => $fritzbox_Username,
'password' => $fritzbox_Password,
'trace' => True,
'exceptions' => 0
)
);
$action = 'X_AVM-DE_DialNumber';
$argument = 'NewX_AVM-DE_PhoneNumber';
$Dial = '**610';
$direction_in_value = $Dial;
$result = $client->{$action}(new SoapParam($direction_in_value, $argument));
if(is_soap_fault($result))
{
print(" Fehlercode: $result->faultcode | Fehlerstring:
$result->faultstring");
}
else
{
print "$result<br>";
}
var_dump ($result);
?>
php.exe FbDial_Soap.php
FbDialHangup_Soap.php
<?php
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
$client = new SoapClient(
null,
array(
'location' => 'http://'.$fritzbox_Adresse.':49000/upnp/control/x_voip',
'uri' => 'urn:dslforum-org:service:X_VoIP:1',
'noroot' => True,
'login' => $fritzbox_Username,
'password' => $fritzbox_Password,
'trace' => True,
'exceptions' => 0
)
);
$action = 'X_AVM-DE_DialHangup';
$result = $client->{$action}();
if(is_soap_fault($result))
{
print(" Fehlercode: $result->faultcode | Fehlerstring:
$result->faultstring");
}
else
{
print "$result<br>";
}
var_dump ($result);
?>
php.exe FbDialHangup_Soap.php
Wahl per Lua ab xxx.06.25 hier:
FbDial_Lua.php
<?php
//$fritzbox_Login = '0';
$fritzbox_Login = '1';
// Login Lua 5.29 ab Firmware xxx.05.29 / xxx.05.5x / xxx.06.xx
// Login Xml 5.28 ab Firmware xxx.04.74 - xxx.05.28
//$fritzbox_Version = '5.28';
//$fritzbox_Version = '5.29';
$fritzbox_Version = '6.25'; // Wahl per Lua ab xxx.06.25
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
include "FbLoginSid.php";
include "CurlHttpGetPost.php";
$Dial = '**610'; // set to the number to dial
$DialPort = '50'; // set port from where should be dialed
$UseClickToDial = '1'; // enable ClickToDial at FB
if ($fritzbox_Login >= '1')
{
if ($SID != '0000000000000000')
{
if ($fritzbox_Version >= '6.25')
{
if ($UseClickToDial == '1')
{
$UseClickToDial = '&clicktodial=on';
}
else
{
$UseClickToDial = '';
}
$URL = 'http://'.$fritzbox_Adresse.'/fon_num/dial_fonbook.lua';
$POST = 'sid='.$SID
.$UseClickToDial
.'&port='.urlencode($DialPort)
.'&btn_apply=';
$dummy = http_post($URL, $POST);
$GET = 'http://'.$fritzbox_Adresse.'/fon_num/fonbook_list.lua'
.'?'
.'sid='.$SID
.'&dial='.urlencode($Dial);
$dummy = http_get($GET);
}
else
{
$URL = 'http://'.$fritzbox_Adresse.'/cgi-bin/webcm';
$POST = 'sid='.$SID.'&getpage=&telcfg:settings/UseClickToDial='.$UseClickToDial
.'&telcfg:command/DialPort='.$DialPort
.'&telcfg:command/Dial='.$Dial;
$dummy = http_post($URL, $POST);
}
}
}
?>
php.exe FbDial_Lua.php
FbDialHangup_Lua.php
<?php
//$fritzbox_Login = '0';
$fritzbox_Login = '1';
// Login Lua 5.29 ab Firmware xxx.05.29 / xxx.05.5x / xxx.06.xx
// Login Xml 5.28 ab Firmware xxx.04.74 - xxx.05.28
//$fritzbox_Version = '5.28';
//$fritzbox_Version = '5.29';
$fritzbox_Version = '6.25'; // Wahl per Lua ab xxx.06.25
$fritzbox_Adresse = 'fritz.box';
//$fritzbox_Adresse = '192.168.178.1';
$fritzbox_Username = '';
$fritzbox_Password = '0000';
include "FbLoginSid.php";
include "CurlHttpGetPost.php";
$UseClickToDial = '1'; // enable ClickToDial at FB
// Hangup Last DialPort
$DialPort = ''; // '50' = set port from where should be dialed
$QueryDialPort = '';
if ($fritzbox_Login >= '1')
{
if ($SID != '0000000000000000')
{
if ($fritzbox_Version >= '6.25')
{
if (!empty($DialPort))
{
}
else
{
if ($UseClickToDial == '1')
{
$UseClickToDial = '&clicktodial=on';
}
else
{
$UseClickToDial = '';
}
$URL = 'http://'.$fritzbox_Adresse.'/fon_num/dial_fonbook.lua';
$POST = 'sid='.$SID
.$UseClickToDial
.'&port='.urlencode($DialPort)
.'&btn_apply=';
$dummy = http_post($URL, $POST);
}
$GET = 'http://'.$fritzbox_Adresse.'/fon_num/fonbook_list.lua'
.'?'
.'sid='.$SID
.'&hangup=';
$dummy = http_get($GET);
}
else
{
if (!empty($DialPort))
{
$QueryDialPort = '&telcfg:command/DialPort='.$DialPort;
}
$URL = 'http://'.$fritzbox_Adresse.'/cgi-bin/webcm';
$POST = 'sid='.$SID.'&getpage=&telcfg:settings/UseClickToDial='.$UseClickToDial
.$QueryDialPort
.'&telcfg:command/Hangup';
$dummy = http_post($URL, $POST);
}
}
}
?>
php.exe FbDialHangup_Lua.php
Erstellt mit eclipse-php 
Gruß Erwin 
FbDial_Php_22012015.zip (3.25 KB)