From 5f11e41760329721da75b9963ef7826c39cddd12 Mon Sep 17 00:00:00 2001 From: giuseppeM99 Date: Fri, 8 Sep 2017 14:04:56 +0200 Subject: [PATCH] Added close method --- main.cpp | 6 ++++++ main.h | 1 + 2 files changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index c39994f..cbad8c6 100644 --- a/main.cpp +++ b/main.cpp @@ -145,6 +145,11 @@ Php::Value VoIP::accept() return this; } +Php::Value VoIP::close() +{ + deinitVoIPController(); + return this; +} void VoIP::__wakeup() { @@ -550,6 +555,7 @@ extern "C" { voip.method<&VoIP::discard>("__destruct", Php::Public | Php::Final); voip.method<&VoIP::discard>("discard", Php::Public | Php::Final, {Php::ByVal("reason", Php::Type::Array, false), Php::ByVal("rating", Php::Type::Array, false), Php::ByVal("debug", Php::Type::Bool, false)}); voip.method<&VoIP::accept>("accept", Php::Public | Php::Final); + voip.method<&VoIP::close>("close", Php::Public | Php::Final); voip.method<&VoIP::__construct>("__construct", Php::Public | Php::Final, { Php::ByVal("creator", Php::Type::Bool), Php::ByVal("otherID", Php::Type::Numeric), Php::ByVal("InputPhoneCall", Php::Type::Array), Php::ByRef("madeline", Php::Type::Object), Php::ByVal("callState", Php::Type::Numeric), Php::ByVal("protocol", Php::Type::Array) }); diff --git a/main.h b/main.h index b587cfc..d8283e7 100644 --- a/main.h +++ b/main.h @@ -93,6 +93,7 @@ public: Php::Value getOtherID(); Php::Value getCallID(); Php::Value getCallState(); + Php::Value close(); AudioInputModule *in; AudioOutputModule *out;