forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
519 B
26 lines
519 B
2 years ago
|
<?php
|
||
|
require_once('PhpSIP.class.php');
|
||
|
|
||
|
/* Sends NOTIFY to reset Linksys phone */
|
||
|
|
||
|
try
|
||
|
{
|
||
|
$api = new PhpSIP();
|
||
|
$api->setUsername('10000'); // authentication username
|
||
|
$api->setPassword('secret'); // authentication password
|
||
|
// $api->setProxy('some_ip_here');
|
||
|
$api->addHeader('Event: resync');
|
||
|
$api->setMethod('NOTIFY');
|
||
|
$api->setFrom('sip:10000@sip.domain.com');
|
||
|
$api->setUri('sip:10000@sip.domain.com');
|
||
|
$res = $api->send();
|
||
|
|
||
|
echo "response: $res\n";
|
||
|
|
||
|
} catch (Exception $e) {
|
||
|
|
||
|
echo $e;
|
||
|
}
|
||
|
|
||
|
?>
|