On call forward if the extension exists use sofia_contact and set the presence_id.

This commit is contained in:
Mark Crane
2013-01-19 17:11:04 +00:00
parent 6e9c0b13d0
commit 1a061283e7

View File

@@ -42,7 +42,12 @@ include "root.php";
//set the dial string
if ($this->forward_all_enabled == "true") {
$this->dial_string = "loopback/".$this->forward_all_destination;
if (extension_exists($this->forward_all_destination)) {
$this->dial_string = "[presence_id=".$this->forward_all_destination."@".$_SESSION['domain_name']."]\${sofia_contact(".$this->forward_all_destination."@".$_SESSION['domain_name'].")}";
}
else {
$this->dial_string = "[presence_id=".$this->forward_all_destination."@".$_SESSION['domain_name']."]loopback/".$this->forward_all_destination;
}
}
else {
$this->dial_string = '';