From 1a061283e7893fa1d6c694dfb5f87f4e48241700 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 19 Jan 2013 17:11:04 +0000 Subject: [PATCH] On call forward if the extension exists use sofia_contact and set the presence_id. --- app/calls/resources/classes/switch_call_forward.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/calls/resources/classes/switch_call_forward.php b/app/calls/resources/classes/switch_call_forward.php index 1a3141ad64..b353f62071 100644 --- a/app/calls/resources/classes/switch_call_forward.php +++ b/app/calls/resources/classes/switch_call_forward.php @@ -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 = '';