From a338871a3c75becd6a9ee7b0a19544852323ca5a Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Mon, 18 May 2020 16:08:19 +0200 Subject: [PATCH 01/23] add Kick, Lock, UnLock --- .../Message/Action/ConfbridgeKickAction.php | 30 +++++++++++++++++++ .../Message/Action/ConfbridgeLockAction.php | 28 +++++++++++++++++ .../Message/Action/ConfbridgeUnLockAction.php | 28 +++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 src/PAMI/Message/Action/ConfbridgeKickAction.php create mode 100644 src/PAMI/Message/Action/ConfbridgeLockAction.php create mode 100644 src/PAMI/Message/Action/ConfbridgeUnLockAction.php diff --git a/src/PAMI/Message/Action/ConfbridgeKickAction.php b/src/PAMI/Message/Action/ConfbridgeKickAction.php new file mode 100644 index 000000000..424768f98 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeKickAction.php @@ -0,0 +1,30 @@ + + */ +class ConfbridgeKickAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $channel Channel to be muted. + * @param string $conference Conference on which to act. + * + * @return void + */ + public function __construct($channel, $conference) + { + parent::__construct('ConfbridgeKick'); + $this->setKey('Channel', $channel); + $this->setKey('Conference', $conference); + } +} diff --git a/src/PAMI/Message/Action/ConfbridgeLockAction.php b/src/PAMI/Message/Action/ConfbridgeLockAction.php new file mode 100644 index 000000000..fe751f835 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeLockAction.php @@ -0,0 +1,28 @@ + + */ +class ConfbridgeLockAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $conference Conference on which to act. + * + * @return void + */ + public function __construct($conference) + { + parent::__construct('ConfbridgeLock'); + $this->setKey('Conference', $conference); + } +} diff --git a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php new file mode 100644 index 000000000..0cd6c91f7 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php @@ -0,0 +1,28 @@ + + */ +class ConfbridgeUnLockAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $conference Conference on which to act. + * + * @return void + */ + public function __construct($conference) + { + parent::__construct('ConfbridgeUnLock'); + $this->setKey('Conference', $conference); + } +} From dc7db4e1cc55f59fb03b6151c3e1ee56fc8aea0b Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Tue, 19 May 2020 05:24:03 +0200 Subject: [PATCH 02/23] add license --- src/PAMI/Message/Action/ConfbridgeKickAction.php | 16 ++++++++++++++++ src/PAMI/Message/Action/ConfbridgeLockAction.php | 16 ++++++++++++++++ .../Message/Action/ConfbridgeUnLockAction.php | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/src/PAMI/Message/Action/ConfbridgeKickAction.php b/src/PAMI/Message/Action/ConfbridgeKickAction.php index 424768f98..5deab8968 100644 --- a/src/PAMI/Message/Action/ConfbridgeKickAction.php +++ b/src/PAMI/Message/Action/ConfbridgeKickAction.php @@ -10,6 +10,22 @@ * @package Message * @subpackage Action * @author Szabolcs Morvai + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * + * Copyright 2011 Marcelo Gornstein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * */ class ConfbridgeKickAction extends ActionMessage { diff --git a/src/PAMI/Message/Action/ConfbridgeLockAction.php b/src/PAMI/Message/Action/ConfbridgeLockAction.php index fe751f835..790b65589 100644 --- a/src/PAMI/Message/Action/ConfbridgeLockAction.php +++ b/src/PAMI/Message/Action/ConfbridgeLockAction.php @@ -10,6 +10,22 @@ * @package Message * @subpackage Action * @author Szabolcs Morvai + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * + * Copyright 2011 Marcelo Gornstein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * */ class ConfbridgeLockAction extends ActionMessage { diff --git a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php index 0cd6c91f7..de79b81d0 100644 --- a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php +++ b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php @@ -10,6 +10,22 @@ * @package Message * @subpackage Action * @author Szabolcs Morvai + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * + * Copyright 2011 Marcelo Gornstein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * */ class ConfbridgeUnLockAction extends ActionMessage { From c24d0546665db135af0341cad2b18700407ee44d Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Tue, 19 May 2020 07:22:26 +0200 Subject: [PATCH 03/23] fix unlock typo --- src/PAMI/Message/Action/ConfbridgeUnLockAction.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php index de79b81d0..011fdee20 100644 --- a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php +++ b/src/PAMI/Message/Action/ConfbridgeUnLockAction.php @@ -2,7 +2,7 @@ namespace PAMI\Message\Action; /** - * ConfbridgeUnLockAction action message. + * ConfbridgeUnlockAction action message. * * PHP Version 5 * @@ -27,7 +27,7 @@ * limitations under the License. * */ -class ConfbridgeUnLockAction extends ActionMessage +class ConfbridgeUnlockAction extends ActionMessage { /** * Constructor. @@ -38,7 +38,7 @@ class ConfbridgeUnLockAction extends ActionMessage */ public function __construct($conference) { - parent::__construct('ConfbridgeUnLock'); + parent::__construct('ConfbridgeUnlock'); $this->setKey('Conference', $conference); } } From 8dc5cf75928c5e32ad85d95f3eb54e830ee3477d Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Tue, 19 May 2020 07:44:48 +0200 Subject: [PATCH 04/23] rename --- .../{ConfbridgeUnLockAction.php => ConfbridgeUnlockAction.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/PAMI/Message/Action/{ConfbridgeUnLockAction.php => ConfbridgeUnlockAction.php} (100%) diff --git a/src/PAMI/Message/Action/ConfbridgeUnLockAction.php b/src/PAMI/Message/Action/ConfbridgeUnlockAction.php similarity index 100% rename from src/PAMI/Message/Action/ConfbridgeUnLockAction.php rename to src/PAMI/Message/Action/ConfbridgeUnlockAction.php From ff47fd7f8beda197b3494e3c4ea8c0b732042d49 Mon Sep 17 00:00:00 2001 From: morvai88 Date: Mon, 25 Jan 2021 09:34:15 +0100 Subject: [PATCH 05/23] Update ConfbridgeKickAction.php From d63fc007be438bdcc150fad7aa564f8345da98be Mon Sep 17 00:00:00 2001 From: morvai88 Date: Mon, 25 Jan 2021 09:34:27 +0100 Subject: [PATCH 06/23] Update ConfbridgeLockAction.php From 2f53c42d2a74bdaf36f4b4155bb3099109bfab56 Mon Sep 17 00:00:00 2001 From: morvai88 Date: Mon, 25 Jan 2021 09:34:35 +0100 Subject: [PATCH 07/23] Update ConfbridgeUnlockAction.php From eb43d0bb98b0c4cb364a90c931d515f931d705d4 Mon Sep 17 00:00:00 2001 From: MoMarCode IT Date: Mon, 25 Jan 2021 10:18:54 +0100 Subject: [PATCH 08/23] fix coding conventions --- src/PAMI/Message/Action/ConfbridgeKickAction.php | 2 +- src/PAMI/Message/Action/ConfbridgeLockAction.php | 2 +- src/PAMI/Message/Action/ConfbridgeUnlockAction.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PAMI/Message/Action/ConfbridgeKickAction.php b/src/PAMI/Message/Action/ConfbridgeKickAction.php index 5deab8968..043133658 100644 --- a/src/PAMI/Message/Action/ConfbridgeKickAction.php +++ b/src/PAMI/Message/Action/ConfbridgeKickAction.php @@ -11,7 +11,7 @@ * @subpackage Action * @author Szabolcs Morvai * @license http://marcelog.github.com/PAMI/ Apache License 2.0 - * + * * Copyright 2011 Marcelo Gornstein * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/PAMI/Message/Action/ConfbridgeLockAction.php b/src/PAMI/Message/Action/ConfbridgeLockAction.php index 790b65589..f8b4968ed 100644 --- a/src/PAMI/Message/Action/ConfbridgeLockAction.php +++ b/src/PAMI/Message/Action/ConfbridgeLockAction.php @@ -11,7 +11,7 @@ * @subpackage Action * @author Szabolcs Morvai * @license http://marcelog.github.com/PAMI/ Apache License 2.0 - * + * * Copyright 2011 Marcelo Gornstein * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/PAMI/Message/Action/ConfbridgeUnlockAction.php b/src/PAMI/Message/Action/ConfbridgeUnlockAction.php index 011fdee20..fcadffa00 100644 --- a/src/PAMI/Message/Action/ConfbridgeUnlockAction.php +++ b/src/PAMI/Message/Action/ConfbridgeUnlockAction.php @@ -11,7 +11,7 @@ * @subpackage Action * @author Szabolcs Morvai * @license http://marcelog.github.com/PAMI/ Apache License 2.0 - * + * * Copyright 2011 Marcelo Gornstein * * Licensed under the Apache License, Version 2.0 (the "License"); From 2502c22e9dce8c70cd1208de57577a975a21bcd5 Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Fri, 25 Mar 2022 15:16:43 +0100 Subject: [PATCH 09/23] add LinkedId to bridge enter event --- src/PAMI/Message/Event/BridgeEnterEvent.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PAMI/Message/Event/BridgeEnterEvent.php b/src/PAMI/Message/Event/BridgeEnterEvent.php index 2be6dd8b1..c965c8081 100644 --- a/src/PAMI/Message/Event/BridgeEnterEvent.php +++ b/src/PAMI/Message/Event/BridgeEnterEvent.php @@ -63,6 +63,16 @@ public function getBridgeUniqueid() return $this->getKey('BridgeUniqueid'); } + /** + * Returns key: 'Linkedid'. + * + * @return string + */ + public function getLinkedid() + { + return $this->getKey('Linkedid'); + } + /** * Returns key: 'BridgeType'. * From 1b35e4a0beac6e56528ff6a13849fe223cbbb99a Mon Sep 17 00:00:00 2001 From: Morvai Szabolcs Date: Mon, 28 Mar 2022 13:20:39 +0200 Subject: [PATCH 10/23] add Accountocde to HangupHandler --- src/PAMI/Message/Event/HangupEvent.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PAMI/Message/Event/HangupEvent.php b/src/PAMI/Message/Event/HangupEvent.php index 2cb09c791..3e4aa95e7 100644 --- a/src/PAMI/Message/Event/HangupEvent.php +++ b/src/PAMI/Message/Event/HangupEvent.php @@ -114,4 +114,14 @@ public function getCauseText() { return $this->getKey('Cause-txt'); } + + /** + * Returns key: 'AccountCode'. + * + * @return string + */ + public function getAccountCode() + { + return $this->getKey('AccountCode'); + } } From 8a6483d1aac71d3682489a72b4c643c800aa6b01 Mon Sep 17 00:00:00 2001 From: MoMarCode IT Date: Tue, 12 Apr 2022 09:28:16 +0200 Subject: [PATCH 11/23] add PJSIPShowEndpoint --- src/PAMI/Message/Action/PJSIPShowEndpoint.php | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/PAMI/Message/Action/PJSIPShowEndpoint.php diff --git a/src/PAMI/Message/Action/PJSIPShowEndpoint.php b/src/PAMI/Message/Action/PJSIPShowEndpoint.php new file mode 100644 index 000000000..02fbb3cf6 --- /dev/null +++ b/src/PAMI/Message/Action/PJSIPShowEndpoint.php @@ -0,0 +1,58 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2022 Morvai Szabolcs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * PJSIPShowEndpoint action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Morvai Szabolcs + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class PJSIPShowEndpoint extends ActionMessage +{ + /** + * Constructor. + * + * @param string $endpoint Endpoint name. + * + * @return void + */ + public function __construct($endpoint) + { + parent::__construct('PJSIPShowEndpoint'); + $this->setKey('Endpoint', $endpoint); + } +} From d58e066f2a71b8267edb39e6d477396d75af2a7c Mon Sep 17 00:00:00 2001 From: MoMarCode IT Date: Tue, 12 Apr 2022 14:31:30 +0200 Subject: [PATCH 12/23] add PJSIPShowContacts, ContacListEvent --- src/PAMI/Message/Action/PJSIPShowContacts.php | 55 +++++ src/PAMI/Message/Event/ContactListEvent.php | 217 ++++++++++++++++++ 2 files changed, 272 insertions(+) create mode 100644 src/PAMI/Message/Action/PJSIPShowContacts.php create mode 100644 src/PAMI/Message/Event/ContactListEvent.php diff --git a/src/PAMI/Message/Action/PJSIPShowContacts.php b/src/PAMI/Message/Action/PJSIPShowContacts.php new file mode 100644 index 000000000..99130afd6 --- /dev/null +++ b/src/PAMI/Message/Action/PJSIPShowContacts.php @@ -0,0 +1,55 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2022 Morvai Szabolcs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * PJSIPShowContacts action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Morvai Szabolcs + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class PJSIPShowContacts extends ActionMessage +{ + /** + * Constructor. + * + * @return void + */ + public function __construct() + { + parent::__construct('PJSIPShowContacts'); + } +} diff --git a/src/PAMI/Message/Event/ContactListEvent.php b/src/PAMI/Message/Event/ContactListEvent.php new file mode 100644 index 000000000..391a770ca --- /dev/null +++ b/src/PAMI/Message/Event/ContactListEvent.php @@ -0,0 +1,217 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2011 Morvai Szabolcs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Event; + +use PAMI\Message\Event\EventMessage; + +/** + * Event triggered when a dial is executed. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Event + * @author Morvai Szabolcs + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class ContactListEvent extends EventMessage +{ + /** + * Returns key: 'ObjectType'. + * + * @return string + */ + public function getObjectType() + { + return $this->getKey('ObjectType'); + } + + /** + * Returns key: 'ObjectName'. + * + * @return string + */ + public function getObjectName() + { + return $this->getKey('ObjectName'); + } + + /** + * Returns key: 'ViaAddr'. + * + * @return string + */ + public function getViaAddr() + { + return $this->getKey('ViaAddr'); + } + + /** + * Returns key: 'QualifyTimeout'. + * + * @return string + */ + public function getQualifyTimeout() + { + return $this->getKey('QualifyTimeout'); + } + + /** + * Returns key: 'CallId'. + * + * @return string + */ + public function getCallId() + { + return $this->getKey('CallId'); + } + + /** + * Returns key: 'RegServer'. + * + * @return string + */ + public function getRegServer() + { + return $this->getKey('RegServer'); + } + + /** + * Returns key: 'PruneOnBoot'. + * + * @return string + */ + public function getPruneOnBoot() + { + return $this->getKey('PruneOnBoot'); + } + + /** + * Returns key: 'Path'. + * + * @return string + */ + public function getPath() + { + return $this->getKey('Path'); + } + + /** + * Returns key: 'Endpoint'. + * + * @return string + */ + public function getEndpoint() + { + return $this->getKey('Endpoint'); + } + + /** + * Returns key: 'ViaPort'. + * + * @return string + */ + public function getViaPort() + { + return $this->getKey('ViaPort'); + } + + /** + * Returns key: 'AuthenticateQualify'. + * + * @return string + */ + public function getAuthenticateQualify() + { + return $this->getKey('AuthenticateQualify'); + } + + /** + * Returns key: 'Uri'. + * + * @return string + */ + public function getUri() + { + return $this->getKey('Uri'); + } + + /** + * Returns key: 'QualifyFrequency'. + * + * @return string + */ + public function getQualifyFrequency() + { + return $this->getKey('QualifyFrequency'); + } + + /** + * Returns key: 'UserAgent'. + * + * @return string + */ + public function getUserAgent() + { + return $this->getKey('UserAgent'); + } + + /** + * Returns key: 'ExpirationTime'. + * + * @return string + */ + public function getExpirationTime() + { + return $this->getKey('ExpirationTime'); + } + + /** + * Returns key: 'OutboundProxy'. + * + * @return string + */ + public function getOutboundProxy() + { + return $this->getKey('OutboundProxy'); + } + + /** + * Returns key: 'Status'. + * + * @return string + */ + public function getStatus() + { + return $this->getKey('Status'); + } +} From 525a875cfa7310457175a8e05a0096d34556b4a8 Mon Sep 17 00:00:00 2001 From: MoMarCode IT Date: Fri, 29 Apr 2022 11:33:42 +0200 Subject: [PATCH 13/23] rename --- .../{PJSIPShowContacts.php => PJSIPShowContactsAction.php} | 2 +- .../{PJSIPShowEndpoint.php => PJSIPShowEndpointAction.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/PAMI/Message/Action/{PJSIPShowContacts.php => PJSIPShowContactsAction.php} (96%) rename src/PAMI/Message/Action/{PJSIPShowEndpoint.php => PJSIPShowEndpointAction.php} (96%) diff --git a/src/PAMI/Message/Action/PJSIPShowContacts.php b/src/PAMI/Message/Action/PJSIPShowContactsAction.php similarity index 96% rename from src/PAMI/Message/Action/PJSIPShowContacts.php rename to src/PAMI/Message/Action/PJSIPShowContactsAction.php index 99130afd6..afdca7411 100644 --- a/src/PAMI/Message/Action/PJSIPShowContacts.php +++ b/src/PAMI/Message/Action/PJSIPShowContactsAction.php @@ -41,7 +41,7 @@ * @license http://marcelog.github.com/PAMI/ Apache License 2.0 * @link http://marcelog.github.com/PAMI/ */ -class PJSIPShowContacts extends ActionMessage +class PJSIPShowContactsAction extends ActionMessage { /** * Constructor. diff --git a/src/PAMI/Message/Action/PJSIPShowEndpoint.php b/src/PAMI/Message/Action/PJSIPShowEndpointAction.php similarity index 96% rename from src/PAMI/Message/Action/PJSIPShowEndpoint.php rename to src/PAMI/Message/Action/PJSIPShowEndpointAction.php index 02fbb3cf6..5d768344c 100644 --- a/src/PAMI/Message/Action/PJSIPShowEndpoint.php +++ b/src/PAMI/Message/Action/PJSIPShowEndpointAction.php @@ -41,7 +41,7 @@ * @license http://marcelog.github.com/PAMI/ Apache License 2.0 * @link http://marcelog.github.com/PAMI/ */ -class PJSIPShowEndpoint extends ActionMessage +class PJSIPShowEndpointAction extends ActionMessage { /** * Constructor. From 2bb57eb7cb5bb9e07fa46aee0659d4f39e6b107e Mon Sep 17 00:00:00 2001 From: MoMarCode IT Date: Fri, 13 May 2022 09:20:38 +0200 Subject: [PATCH 14/23] add linkedid to newstate --- src/PAMI/Message/Event/NewstateEvent.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PAMI/Message/Event/NewstateEvent.php b/src/PAMI/Message/Event/NewstateEvent.php index f2bc01cb3..74e69d9c6 100644 --- a/src/PAMI/Message/Event/NewstateEvent.php +++ b/src/PAMI/Message/Event/NewstateEvent.php @@ -117,6 +117,16 @@ public function getUniqueID() return $this->getKey('UniqueID'); } + /** + * Returns key: 'Linkedid'. + * + * @return string + */ + public function getLinkedid() + { + return $this->getKey('Linkedid'); + } + /** * Returns key: 'ConnectedLineNum'. Asterisk >= 1.8. * From 21e3fb5d2aa6a429b449280efedd53243e7c1f72 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Mon, 6 Feb 2023 15:16:03 +0100 Subject: [PATCH 15/23] Add sorcery memory_cache actions. --- .../Action/SorceryMemoryCacheExpireAction.php | 58 +++++++++++++++++ .../SorceryMemoryCacheExpireObjectAction.php | 60 +++++++++++++++++ .../SorceryMemoryCachePopulateAction.php | 58 +++++++++++++++++ .../Action/SorceryMemoryCacheStaleAction.php | 58 +++++++++++++++++ .../SorceryMemoryCacheStaleObjectAction.php | 64 +++++++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 src/PAMI/Message/Action/SorceryMemoryCacheExpireAction.php create mode 100644 src/PAMI/Message/Action/SorceryMemoryCacheExpireObjectAction.php create mode 100644 src/PAMI/Message/Action/SorceryMemoryCachePopulateAction.php create mode 100644 src/PAMI/Message/Action/SorceryMemoryCacheStaleAction.php create mode 100644 src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php diff --git a/src/PAMI/Message/Action/SorceryMemoryCacheExpireAction.php b/src/PAMI/Message/Action/SorceryMemoryCacheExpireAction.php new file mode 100644 index 000000000..4eded4c85 --- /dev/null +++ b/src/PAMI/Message/Action/SorceryMemoryCacheExpireAction.php @@ -0,0 +1,58 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * SorceryMemoryCacheExpire action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class SorceryMemoryCacheExpireAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $cache Cache name. + * + * @return void + */ + public function __construct($cache) + { + parent::__construct('SorceryMemoryCacheExpire'); + $this->setKey('Cache', $cache); + } +} diff --git a/src/PAMI/Message/Action/SorceryMemoryCacheExpireObjectAction.php b/src/PAMI/Message/Action/SorceryMemoryCacheExpireObjectAction.php new file mode 100644 index 000000000..e14679804 --- /dev/null +++ b/src/PAMI/Message/Action/SorceryMemoryCacheExpireObjectAction.php @@ -0,0 +1,60 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * SorceryMemoryCacheExpireObject action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class SorceryMemoryCacheExpireObjectAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $cache Cache name. + * @param string $object Object name. + * + * @return void + */ + public function __construct($cache, $object) + { + parent::__construct('SorceryMemoryCacheExpireObject'); + $this->setKey('Cache', $cache); + $this->setKey('Object', $object); + } +} diff --git a/src/PAMI/Message/Action/SorceryMemoryCachePopulateAction.php b/src/PAMI/Message/Action/SorceryMemoryCachePopulateAction.php new file mode 100644 index 000000000..83ab8ea54 --- /dev/null +++ b/src/PAMI/Message/Action/SorceryMemoryCachePopulateAction.php @@ -0,0 +1,58 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * SorceryMemoryCachePopulate action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class SorceryMemoryCachePopulateAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $cache Cache name. + * + * @return void + */ + public function __construct($cache) + { + parent::__construct('SorceryMemoryCachePopulate'); + $this->setKey('Cache', $cache); + } +} diff --git a/src/PAMI/Message/Action/SorceryMemoryCacheStaleAction.php b/src/PAMI/Message/Action/SorceryMemoryCacheStaleAction.php new file mode 100644 index 000000000..8d265243c --- /dev/null +++ b/src/PAMI/Message/Action/SorceryMemoryCacheStaleAction.php @@ -0,0 +1,58 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * SorceryMemoryCacheStale action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class SorceryMemoryCacheStaleAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $cache Cache name. + * + * @return void + */ + public function __construct($cache) + { + parent::__construct('SorceryMemoryCacheStale'); + $this->setKey('Cache', $cache); + } +} diff --git a/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php b/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php new file mode 100644 index 000000000..17db3377f --- /dev/null +++ b/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php @@ -0,0 +1,64 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * SorceryMemoryCacheStaleObject action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class SorceryMemoryCacheStaleObjectAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $cache Cache name. + * @param string $object Object name. + * @param bool $reload Reload from backend. + * + * @return void + */ + public function __construct($cache, $object, $reload = false) + { + parent::__construct('SorceryMemoryCacheExpireObject'); + $this->setKey('Cache', $cache); + $this->setKey('Object', $object); + if ($reload !== false) { + $this->setKey('Reload', 'true'); + } + } +} From b019e963849c8b1505badb76b4515a378d7f0047 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Mon, 6 Feb 2023 15:18:24 +0100 Subject: [PATCH 16/23] Fix action --- src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php b/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php index 17db3377f..ab0e36146 100644 --- a/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php +++ b/src/PAMI/Message/Action/SorceryMemoryCacheStaleObjectAction.php @@ -54,7 +54,7 @@ class SorceryMemoryCacheStaleObjectAction extends ActionMessage */ public function __construct($cache, $object, $reload = false) { - parent::__construct('SorceryMemoryCacheExpireObject'); + parent::__construct('SorceryMemoryCacheStaleObject'); $this->setKey('Cache', $cache); $this->setKey('Object', $object); if ($reload !== false) { From 27f147670b6d97b09d08f6e0b6bf48d264483e29 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Wed, 15 Feb 2023 19:53:27 +0100 Subject: [PATCH 17/23] Fix chan_sip NOTIFY Action missing Variable parameter. --- src/PAMI/Message/Action/SIPNotifyAction.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PAMI/Message/Action/SIPNotifyAction.php b/src/PAMI/Message/Action/SIPNotifyAction.php index 9e6d54fc3..9c72cb11d 100644 --- a/src/PAMI/Message/Action/SIPNotifyAction.php +++ b/src/PAMI/Message/Action/SIPNotifyAction.php @@ -47,12 +47,16 @@ class SIPNotifyAction extends ActionMessage * Constructor. * * @param string $channel Peer to receive the notify. + * @param array $variables Variable Key-Value pairs. * * @return void */ - public function __construct($channel) + public function __construct($channel, $variables) { parent::__construct('SIPnotify'); $this->setKey('Channel', $channel); + foreach ($variables as $key => $value) { + $this->setKey('Variable', $key . '=' . $value); + } } } From 523772c3dc346e854de8e514cb303409ee452bd7 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Wed, 15 Feb 2023 20:05:12 +0100 Subject: [PATCH 18/23] Add PJSIPNotify Action. --- src/PAMI/Message/Action/PJSIPNotifyAction.php | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/PAMI/Message/Action/PJSIPNotifyAction.php diff --git a/src/PAMI/Message/Action/PJSIPNotifyAction.php b/src/PAMI/Message/Action/PJSIPNotifyAction.php new file mode 100644 index 000000000..501fc0f06 --- /dev/null +++ b/src/PAMI/Message/Action/PJSIPNotifyAction.php @@ -0,0 +1,70 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * PJSIPNotify action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class PJSIPNotifyAction extends ActionMessage +{ + /** + * Constructor. + * + * @param string $endpoint PJSIP endpoint or URI to receive the notify. + * @param array/string $variables Variable Key-Value pairs / pjsip_notify.conf context (section) name. + * + * @return void + */ + public function __construct($endpoint, $variables) + { + parent::__construct('PJSIPNotify'); + if (strpos($endpoint, "@") !== false) { + $this->setKey('URI', $endpoint); + } else { + $this->setKey('Endpoint', $endpoint); + } + if (is_array($variables)) { + foreach ($variables as $key => $value) { + $this->setKey('Variable', $key . '=' . $value); + } + } else { + $this->setKey('Option', $variables); + } + } +} From 47611d38863fe228d2212b7b7449974dae973c6b Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Sun, 8 Oct 2023 11:27:56 +0200 Subject: [PATCH 19/23] Add Voicemail Actions. --- .../Message/Action/VoicemailRefreshAction.php | 61 +++++++++++++++++++ .../Action/VoicemailUserStatusAction.php | 57 +++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 src/PAMI/Message/Action/VoicemailRefreshAction.php create mode 100644 src/PAMI/Message/Action/VoicemailUserStatusAction.php diff --git a/src/PAMI/Message/Action/VoicemailRefreshAction.php b/src/PAMI/Message/Action/VoicemailRefreshAction.php new file mode 100644 index 000000000..320f155be --- /dev/null +++ b/src/PAMI/Message/Action/VoicemailRefreshAction.php @@ -0,0 +1,61 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * VoicemailRefresh action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class VoicemailRefreshAction extends ActionMessage +{ + /** + * Constructor. + * + * @return void + */ + public function __construct($context = null, $mailbox = null) + { + parent::__construct('VoicemailRefresh'); + if(!is_null($context)){ + $this->setKey('Context', $context); + if(!is_null($mailbox)){ + $this->setKey('Mailbox', $mailbox); + } + } + } +} diff --git a/src/PAMI/Message/Action/VoicemailUserStatusAction.php b/src/PAMI/Message/Action/VoicemailUserStatusAction.php new file mode 100644 index 000000000..561df93e6 --- /dev/null +++ b/src/PAMI/Message/Action/VoicemailUserStatusAction.php @@ -0,0 +1,57 @@ + + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://marcelog.github.com/PAMI/ + * + * Copyright 2023 Sperl Viktor + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +namespace PAMI\Message\Action; + +/** + * VoicemailUserStatus action message. + * + * PHP Version 5 + * + * @category Pami + * @package Message + * @subpackage Action + * @author Sperl Viktor + * @license http://marcelog.github.com/PAMI/ Apache License 2.0 + * @link http://marcelog.github.com/PAMI/ + */ +class VoicemailUserStatusAction extends ActionMessage +{ + /** + * Constructor. + * + * @return void + */ + public function __construct($context, $mailbox) + { + parent::__construct('VoicemailUserStatus'); + $this->setKey('Context', $context); + $this->setKey('Mailbox', $mailbox); + } +} From 462c060b5ff19bf68b8aa1c4e679c1bdc2f8d074 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Sun, 8 Oct 2023 11:56:04 +0200 Subject: [PATCH 20/23] Add filter param to getconfig. --- src/PAMI/Message/Action/GetConfigAction.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PAMI/Message/Action/GetConfigAction.php b/src/PAMI/Message/Action/GetConfigAction.php index 327389668..1813684a7 100644 --- a/src/PAMI/Message/Action/GetConfigAction.php +++ b/src/PAMI/Message/Action/GetConfigAction.php @@ -51,12 +51,15 @@ class GetConfigAction extends ActionMessage * * @return void */ - public function __construct($filename, $category = false) + public function __construct($filename, $category = false, $filter = false) { parent::__construct('GetConfig'); $this->setKey('Filename', $filename); if ($category != false) { $this->setKey('Category', $category); } + if ($filter != false) { + $this->setKey('Filter', $filter); + } } } From ede2ed77db23960bfab7742182bd4b58fd58da82 Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Sun, 8 Oct 2023 12:40:50 +0200 Subject: [PATCH 21/23] Use false as an unset value, like everywhere else. --- src/PAMI/Message/Action/VoicemailRefreshAction.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PAMI/Message/Action/VoicemailRefreshAction.php b/src/PAMI/Message/Action/VoicemailRefreshAction.php index 320f155be..c87248413 100644 --- a/src/PAMI/Message/Action/VoicemailRefreshAction.php +++ b/src/PAMI/Message/Action/VoicemailRefreshAction.php @@ -48,12 +48,12 @@ class VoicemailRefreshAction extends ActionMessage * * @return void */ - public function __construct($context = null, $mailbox = null) + public function __construct($context = false, $mailbox = false) { parent::__construct('VoicemailRefresh'); - if(!is_null($context)){ + if($context != false){ $this->setKey('Context', $context); - if(!is_null($mailbox)){ + if($mailbox != false){ $this->setKey('Mailbox', $mailbox); } } From 47550118339b3e61dda6ec5a6f3a77e667f5f5ed Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Sun, 8 Oct 2023 20:29:22 +0200 Subject: [PATCH 22/23] Extend GetConfigJSON. --- src/PAMI/Message/Action/GetConfigJSONAction.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PAMI/Message/Action/GetConfigJSONAction.php b/src/PAMI/Message/Action/GetConfigJSONAction.php index 3bcb4d2e0..9f67fe4a9 100644 --- a/src/PAMI/Message/Action/GetConfigJSONAction.php +++ b/src/PAMI/Message/Action/GetConfigJSONAction.php @@ -50,9 +50,15 @@ class GetConfigJSONAction extends ActionMessage * * @return void */ - public function __construct($filename) + public function __construct($filename, $category = false, $filter = false) { parent::__construct('GetConfigJSON'); $this->setKey('Filename', $filename); + if ($category != false) { + $this->setKey('Category', $category); + } + if ($filter != false) { + $this->setKey('Filter', $filter); + } } } From fd6aca3d9c0e6707c6bea542e0c45f361d5c279b Mon Sep 17 00:00:00 2001 From: Sperl Viktor Date: Sun, 8 Oct 2023 21:45:08 +0200 Subject: [PATCH 23/23] Extend docblock --- src/PAMI/Message/Action/GetConfigAction.php | 2 +- src/PAMI/Message/Action/GetConfigJSONAction.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PAMI/Message/Action/GetConfigAction.php b/src/PAMI/Message/Action/GetConfigAction.php index 1813684a7..61a108a03 100644 --- a/src/PAMI/Message/Action/GetConfigAction.php +++ b/src/PAMI/Message/Action/GetConfigAction.php @@ -47,7 +47,7 @@ class GetConfigAction extends ActionMessage * Constructor. * * @param string $filename Configuration filename (e.g.: foo.conf). - * @param boolean $category Category in configuration file. + * @param string $category Contect name in ini file (e.g.: [general]). * * @return void */ diff --git a/src/PAMI/Message/Action/GetConfigJSONAction.php b/src/PAMI/Message/Action/GetConfigJSONAction.php index 9f67fe4a9..01b007875 100644 --- a/src/PAMI/Message/Action/GetConfigJSONAction.php +++ b/src/PAMI/Message/Action/GetConfigJSONAction.php @@ -47,6 +47,7 @@ class GetConfigJSONAction extends ActionMessage * Constructor. * * @param string $filename Configuration filename (e.g.: foo.conf). + * @param string $category Contect name in ini file (e.g.: [general]). * * @return void */