diff --git a/app/call_flows/call_flow_edit.php b/app/call_flows/call_flow_edit.php
index 7869931092..2b7e2541b5 100644
--- a/app/call_flows/call_flow_edit.php
+++ b/app/call_flows/call_flow_edit.php
@@ -245,6 +245,31 @@
$p->delete("dialplan_add", "temp");
$p->delete("dialplan_edit", "temp");
+ // Update subscribed endpoints
+ $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
+ if ($fp) {
+ //send the event
+ $event = "sendevent PRESENCE_IN\n";
+ $event .= "proto: flow\n";
+ $event .= "event_type: presence\n";
+ $event .= "alt_event_type: dialog\n";
+ $event .= "Presence-Call-Direction: outbound\n";
+ $event .= "state: Active (1 waiting)\n";
+ $event .= "from: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
+ $event .= "login: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
+ $event .= "unique-id: ".$call_flow_uuid."\n";
+ if ($call_flow_status == "true") {
+ $event .= "answer-state: confirmed\n";
+ } else {
+ $event .= "answer-state: terminated\n";
+ }
+
+ event_socket_request($fp, $event);
+ //echo $event."
";
+ fclose($fp);
+
+ }
+
//debug info
//echo "
"; //print_r($message);