diff --git a/ChangeLog b/ChangeLog index 79e0ad99139..7f4242a6a91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,140 +1,176 @@ +Wed, 07 Feb 2024 12:59:02 +0100 IvozProvider Team + + * IvozProvider 4.0.0 released + + * Software Version Upgrade + - Debian base system upgraded from 11 (bullseye) to 12 (bookworm) + - Kamailio upgraded from 5.6.0 to 5.7.3 + - rtpengine upgraded from 9.5.4 to 11.5.1 + - Asterisk upgraded from 18.2.2 to 20.5.0 + - PHP upgraded from 8.0.13 to 8.2.7 + - MySQL (Percona Server) upgraded from 8.0.25 to 8.0.34 + + * Proxies + - Added CDR entries for users missed calls #2423 + - Added behind NAT experimental support #2495 + + * Portals + - Removed classic klear portal access #2470 + - Added support to configure main portal color #2458 + - Added new filter options for Active Calls pages #2457 + - Added missing email and attach sound fields for Residential voicemails #2468 + - Added missing domain for Brands when Residential or Retail features are enabled #2482 + - Fixed some realtime logics for platform and brand Active Calls #2483 + +Fri, 09 Feb 2024 13:19:03 +0100 IvozProvider Team + + * Ivozprovider 3.4.1 released + + * Portals + - Added missing email and attach sound fields for Residential voicemails #2468 + - Added missing domain for Brands when Residential or Retail features are enabled #2482 + + * Core + - Fixed a bug that prevented friends creation for vPBX without a Corporation #2478 + - Fixed balance operations for carriers #2452 + Tue, 28 Nov 2023 13:33:23 +0100 IvozProvider Team -* Ivozprovider 3.4.0 released - -* New Portals - - Fixed prepaid balances operations - - Fixed voicemail message counter on dashboards - - Fixed labels in platform portal feature selectors - - Fixed audio players -* Application Server - - Configurable setting to announce how many participants are already present when joining a conference room. - - Pause and unpause services for queues -* Other - - Brand new realtime active calls microservice written in go that replaces the old one written in openswoole - -Tue, 03 Oct 2023 09:39:40 +0200 IvozProvider Team - -* Ivozprovider 3.3.0 released - -* New Portals - - New portals are now loaded by default unless explicit configuration - - Old portals are still available adding /classic to URL path - - Portals header images are now properly load - - Added missing actions to simulate calls - - Added missing actions to preview invoices templates - - Added missing actions to test and restore terminal provisioning templates - - Improved Terminal provisioning template parser security - - Added missing importer for Holiday dates - - Added missing exporter for Call registry -* Other - - Fixed a bug in Recordings encoder that stopped the process on first error - - Added new router microservice to determine the portal associated to each domain + * IvozProvider 3.4.0 released + + * New Portals + - Fixed prepaid balances operations + - Fixed voicemail message counter on dashboards + - Fixed labels in platform portal feature selectors + - Fixed audio players + * Application Server + - Configurable setting to announce how many participants are already present when joining a conference room. + - Pause and unpause services for queues + * Other + - Brand new realtime active calls microservice written in go that replaces the old one written in openswoole + + Tue, 03 Oct 2023 09:39:40 +0200 IvozProvider Team + + * Ivozprovider 3.3.0 released + + * New Portals + - New portals are now loaded by default unless explicit configuration + - Old portals are still available adding /classic to URL path + - Portals header images are now properly load + - Added missing actions to simulate calls + - Added missing actions to preview invoices templates + - Added missing actions to test and restore terminal provisioning templates + - Improved Terminal provisioning template parser security + - Added missing importer for Holiday dates + - Added missing exporter for Call registry + * Other + - Fixed a bug in Recordings encoder that stopped the process on first error + - Added new router microservice to determine the portal associated to each domain Tue, 18 Jul 2023 11:21:55 +0200 IvozProvider Team -* Ivozprovider 3.2.0 released - -* New React based web portals - - Added impersonation between portals using internal administrators - - Added translations to officially supported languages - - Added dashboards to all portals - - Added support for Web portal customizable Logo - - Added a Web Portal based configuration option to load react portals by default - - New portals always accessible adding /platform, /brand, /client and /user to URL path - - Classic portal always accessible adding /classic to URL path - - Added missing action to regenerate invoices - - Added missing action to unban brute force attacks - - Added missing action to re-rate external calls - - Added missing actions to modify pre-paid balances - - Added documentation links to all screens - - Fixed a bug while adding client services not enabled by brand - - Lots of fixes in platform, brand, client and users portals screens - -* Proxies - - Fixed a bug with unsolicited MWI NOTIFY messages - -* Application Server - - Updated Queue members table to support future dynamic join and leave functionalities - - Fixed a bug identifying Terminals when their name had been changed - - Added click2dial contexts - -* Core - - Added Corporation entity to group vPBX that can share Inter-vPBX Friends (internal calls between vPBX clients) - - Improved changelog entries to reflect Administrators impersonation chains + * IvozProvider 3.2.0 released + + * New React based web portals + - Added impersonation between portals using internal administrators + - Added translations to officially supported languages + - Added dashboards to all portals + - Added support for Web portal customizable Logo + - Added a Web Portal based configuration option to load react portals by default + - New portals always accessible adding /platform, /brand, /client and /user to URL path + - Classic portal always accessible adding /classic to URL path + - Added missing action to regenerate invoices + - Added missing action to unban brute force attacks + - Added missing action to re-rate external calls + - Added missing actions to modify pre-paid balances + - Added documentation links to all screens + - Fixed a bug while adding client services not enabled by brand + - Lots of fixes in platform, brand, client and users portals screens + + * Proxies + - Fixed a bug with unsolicited MWI NOTIFY messages + + * Application Server + - Updated Queue members table to support future dynamic join and leave functionalities + - Fixed a bug identifying Terminals when their name had been changed + - Added click2dial contexts + + * Core + - Added Corporation entity to group vPBX that can share Inter-vPBX Friends (internal calls between vPBX clients) + - Improved changelog entries to reflect Administrators impersonation chains Fri, 10 Mar 2023 10:22:06 +0100 IvozProvider Team -* Ivozprovider 3.1.0 released - -* Initial version of new portals for all tenants - - Using React 18.2 framework - - CRUD operations supported - - Still a work in progress, not ready for production usage - -* Initial React User portal implementation - - Added Calls list section - - Added My Account section for changing user's basic information - - Added Preferences section for changing call specific settings - - Added Call Forward Settings to configure forwarding options - - Accessible adding /user/ to existing portal path - - Requires user email and password to login - -* Initial React Client portal implementation - - Added sections for vPBX, Residential, Retail and Wholesale - - General section to manage Users, Terminals, Extensions, DDIs, Faxes, Services and Contacts - - Routing endpoint section to manage IVRs, Hunt Groups, Queues, Conditional Routes, Friends, Conference Rooms and Voicemails - - Routing tools section to manage External Filters, Calendars, Schedules Match Lists and Route Locks - - User configuration section to manage Outgoing DDI Rules, Pickup Groups, Call ACLS and Locations - - Multimedia section to manage Locutions and Music on Hold - - Calls section to manage Call registries, Active Calls, External Calls, Calls CSV Schedules and Recordings - - Accessible adding /client/ to existing portal path - - Requires Client Administrator credentials to login (or impersonation from Brand portal) - -* Initial React Brand portal implementation - - Added Clients section to manage Virtual PBX, Residential, Retail and Wholesale clients - - Added Providers section to manage Carrier, DDI Providers and DDIs - - Added Routing section to manage Outgoing Routing, Routing Patterns, Routing Pattern groups and Routing Tags - - Added Billing section to manage Rating Plans, Destinations, Rates, Prepaid Balances and Daily usages - - Added Invoice section to manage Invoice, Invoice Schedulers, Fixed costs and Invoice Templates - - Added Calls section to manage Active brand Calls, External calls and Call CSV Schedulers - - Added Settings section to manage Company Portals, Special Numbers, Numeric Transformation, Notification Templates, Music on Hold, Brand Service and Match Lists - - Added View section to display lists of Retail Accounts, Residential Devices, Users, and Banned IP addresses - - Added support to impersonate a Client Administrator to access Client portal without credentials - - Accessible adding /brand/ to existing portal path - - Requires Brand Administrator credentials to login (or impersonation from Platform portal) - -* Initial React Platform portal implementation - - Added Brand, Main Operators, Anti-flood Banned IPs, Terminal Manufacturers and Services management screens - - Added Currencies, Notification templates, Invoice templates, Special numbers, Platform portals management screens - - Added realtime Active calls and External calls views - - Added Infrastructure section to manage Proxy Users, Proxy Trunks, Media relays and Application Servers - - Accessible adding /platform/ to existing portal path - - Requires Platform Administrator credentials to login - -* API - - Lots of changes in Rest API to fulfill new portals requirements. See specific API Changelogs for details. - - Main breaking changes - * Replaced Company nif, postalAddress, town, province and countryName properties with new Invoice model - * Removed externallyRated property from Carrier - * Removed billInboundCalls property from DDIs - -* Other Features and Fixed - - Upgraded Kamailio to 3.6.2 - - Upgraded RTPengine to 10.5.3 - - Added configurable Announce Position locutions to Queues - - Added Display name in Queues to override default Caller name in Queue members calls - - Added Address Book section to store External numbers (not yet used) - - Added Description field in DDIs - - Added support to use DDIs only for outbound presentation (DDI types) - - Changed rtpengine control port to 2223 - - FastAGI server address is now configurable - - Added APIBAN optional configuration for Proxies - - Fixed Media Relay selection logic when specific set was configured - - Fixed Media management in parallel-forking scenarios - - Added RTP timeout settings for vPBX and Residential calls + * IvozProvider 3.1.0 released + + * Initial version of new portals for all tenants + - Using React 18.2 framework + - CRUD operations supported + - Still a work in progress, not ready for production usage + + * Initial React User portal implementation + - Added Calls list section + - Added My Account section for changing user's basic information + - Added Preferences section for changing call specific settings + - Added Call Forward Settings to configure forwarding options + - Accessible adding /user/ to existing portal path + - Requires user email and password to login + + * Initial React Client portal implementation + - Added sections for vPBX, Residential, Retail and Wholesale + - General section to manage Users, Terminals, Extensions, DDIs, Faxes, Services and Contacts + - Routing endpoint section to manage IVRs, Hunt Groups, Queues, Conditional Routes, Friends, Conference Rooms and Voicemails + - Routing tools section to manage External Filters, Calendars, Schedules Match Lists and Route Locks + - User configuration section to manage Outgoing DDI Rules, Pickup Groups, Call ACLS and Locations + - Multimedia section to manage Locutions and Music on Hold + - Calls section to manage Call registries, Active Calls, External Calls, Calls CSV Schedules and Recordings + - Accessible adding /client/ to existing portal path + - Requires Client Administrator credentials to login (or impersonation from Brand portal) + + * Initial React Brand portal implementation + - Added Clients section to manage Virtual PBX, Residential, Retail and Wholesale clients + - Added Providers section to manage Carrier, DDI Providers and DDIs + - Added Routing section to manage Outgoing Routing, Routing Patterns, Routing Pattern groups and Routing Tags + - Added Billing section to manage Rating Plans, Destinations, Rates, Prepaid Balances and Daily usages + - Added Invoice section to manage Invoice, Invoice Schedulers, Fixed costs and Invoice Templates + - Added Calls section to manage Active brand Calls, External calls and Call CSV Schedulers + - Added Settings section to manage Company Portals, Special Numbers, Numeric Transformation, Notification Templates, Music on Hold, Brand Service and Match Lists + - Added View section to display lists of Retail Accounts, Residential Devices, Users, and Banned IP addresses + - Added support to impersonate a Client Administrator to access Client portal without credentials + - Accessible adding /brand/ to existing portal path + - Requires Brand Administrator credentials to login (or impersonation from Platform portal) + + * Initial React Platform portal implementation + - Added Brand, Main Operators, Anti-flood Banned IPs, Terminal Manufacturers and Services management screens + - Added Currencies, Notification templates, Invoice templates, Special numbers, Platform portals management screens + - Added realtime Active calls and External calls views + - Added Infrastructure section to manage Proxy Users, Proxy Trunks, Media relays and Application Servers + - Accessible adding /platform/ to existing portal path + - Requires Platform Administrator credentials to login + + * API + - Lots of changes in Rest API to fulfill new portals requirements. See specific API Changelogs for details. + - Main breaking changes + * Replaced Company nif, postalAddress, town, province and countryName properties with new Invoice model + * Removed externallyRated property from Carrier + * Removed billInboundCalls property from DDIs + + * Other Features and Fixed + - Upgraded Kamailio to 3.6.2 + - Upgraded RTPengine to 10.5.3 + - Added configurable Announce Position locutions to Queues + - Added Display name in Queues to override default Caller name in Queue members calls + - Added Address Book section to store External numbers (not yet used) + - Added Description field in DDIs + - Added support to use DDIs only for outbound presentation (DDI types) + - Changed rtpengine control port to 2223 + - FastAGI server address is now configurable + - Added APIBAN optional configuration for Proxies + - Fixed Media Relay selection logic when specific set was configured + - Fixed Media management in parallel-forking scenarios + - Added RTP timeout settings for vPBX and Residential calls Thu, 23 Jun 2022 13:06:47 +0200 IvozProvider Team diff --git a/Jenkinsfile b/Jenkinsfile index ddfd978a118..a87d978004e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,6 +26,7 @@ pipeline { SYMFONY_PHPUNIT_DIR = "/opt/phpunit/" SYMFONY_PHPUNIT_VERSION = "9.5.3" DOCKER_IMAGE_TAG = getDockerImageTag() + JIRA_TICKET = getJiraTicket() } stages { @@ -75,7 +76,7 @@ pipeline { } stage('test-backend') { parallel { - stage('app-console') { + stage('app-generic') { agent { docker { image "ironartemis/ivozprovider-testing-base:${env.DOCKER_IMAGE_TAG}" @@ -85,6 +86,7 @@ pipeline { } steps { sh '/opt/irontec/ivozprovider/library/bin/test-app-console' + sh '/opt/irontec/ivozprovider/library/bin/test-app-dependencies' } post { success { notifySuccessGithub() } @@ -472,6 +474,47 @@ pipeline { } } } + // -------------------------------------------------------------------- + // Functional Testing stage + // -------------------------------------------------------------------- + stage('functional') { + steps { + script { + if (!env.JIRA_TICKET) { + echo "No ticket associated." + return + } + + def issue = jiraGetIssue site: 'irontec.atlassian.net', idOrKey: env.JIRA_TICKET + + // Functional Reviewer - 10105 + if (issue.data.fields.customfield_10105) { + println "Functional Reviewer: ${issue.data.fields.customfield_10105.displayName}" + } else { + println "No functional reviewer assigned." + } + + // Link issue Pull Request field with current branch + // customfield_10126 - Pull Request + def fields = [fields: [customfield_10126: env.JOB_BASE_NAME]] + jiraEditIssue site: 'irontec.atlassian.net', idOrKey: env.JIRA_TICKET, issue: fields + + // Validated - 10325 + def status = issue.data.fields.status + println "Issue Status: ${status.name} (${status.id})" + + // For Issues with Functional reviewer and not validated + if (issue.data.fields.customfield_10105 && status.id != "10325") { + unstable "Functional approval required." + } + } + } + post { + success { notifySuccessGithub() } + failure { notifyFailureGithub() } + unstable { notifyUnstableGithub() } + } + } } // ------------------------------------------------------------------------ @@ -480,6 +523,7 @@ pipeline { post { failure { notifyFailureMattermost() } fixed { notifyFixedMattermost() } + unstable { script { currentBuild.result = 'ABORTED' } } cleanup { cleanWs() } } } @@ -487,6 +531,15 @@ pipeline { // ----------------------------------------------------------------------------- // Helper Functions // ----------------------------------------------------------------------------- +void getJiraTicket() { + def matcher = "${env.CHANGE_BRANCH}" =~ /^(?\w+-\d+)-.*$/ + if (matcher.matches()) { + return matcher.group("jira") + } else { + return "" + } +} + boolean hasLabel(String label) { return env.CHANGE_ID && pullRequest.labels.contains(label) } @@ -518,6 +571,14 @@ void notifyFailureGithub() { ]) } +void notifyUnstableGithub() { + githubNotify([ + context: "ivozprovider-testing-${STAGE_NAME}", + description: "Cancelled", + status: "ERROR" + ]) +} + void notifyFailureMattermost() { if (env.GIT_BRANCH == 'bleeding' || env.GIT_BRANCH == 'halliday') { mattermostSend([ diff --git a/README.md b/README.md index 5282261d909..02af7357c78 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - ![stable](https://raster.shields.io/badge/stable-2.23-blue.png) ![release](https://raster.shields.io/badge/release-artemis-14b9bc.png) + ![stable](https://raster.shields.io/badge/stable-3.4-blue.png) ![release](https://raster.shields.io/badge/release-halliday-14b9bc.png) Ivoz Provider is a multitenant solution for VoIP telephony providers designed for horizontal scaling and load balancing. @@ -17,17 +17,15 @@ From its beginning, IvozProvider was designed to be installed distributed betwee * Proxy: - Provides **SIP communication** with Providers and Users terminals - Provides **media relay** between endpoints - - Powered by [Kamailo SIP Server 5.6](https://www.kamailio.org/w/) + - Powered by [Kamailo SIP Server 5.7](https://www.kamailio.org/w/) * Portal: - Provides **Web interfaces** for all platform roles - Access to all Bussiness data and shared files through **Rest API** services - - Management interfaces powered by [Klear Framework](https://www.irontec.com/internet/klear) - - User interface powered by [AngularJS](https://angularjs.org/) * Application Server: - Provides **PBX features** and runs configured logics - - Powered by [Asterisk 18 LTS](http://www.asterisk.org/) with [PJSIP](http://www.pjsip.org/) channel driver + - Powered by [Asterisk 20 LTS](http://www.asterisk.org/) with [PJSIP](http://www.pjsip.org/) channel driver - Logics implemented in PHP using fastagi AGI * Data: @@ -48,11 +46,12 @@ There are [several ways](https://irontec.github.io/ivozprovider/en/artemis/basic If you want to test an [standalone](https://irontec.github.io/ivozprovider/en/artemis/basic_concepts/installation/install_types.html#standalone-install) installation, we recommend using one of auto-install CDs based on Debian Stretch 9.4 amd64. -| Version | 64 bits | 32 bits | -|--------------------------|:---------------------------------------------------------------------------------------------------------------------------------------:|:-------:| -| oldstable (oasis 1.7) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-amd64.iso) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-i386.iso)| -| stable (artemis 2.23.0) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-2.23~2.23.0-artemis-amd64.iso) | | -| testing (halliday 3.4.0) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-3.4~3.4.0-halliday-amd64.iso) | | +| Version | 64 bits | 32 bits | +|----------------------------|:---------------------------------------------------------------------------------------------------------------------------------------:|:-------:| +| oldoldstable (oasis 1.7) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-amd64.iso) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-i386.iso)| +| oldstable (artemis 2.23.0) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-2.23~2.23.0-artemis-amd64.iso) | | +| stable (halliday 3.4.1) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-3.4~3.4.1-halliday-amd64.iso) | | +| testing (tempest 4.0.0) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-4.0~4.0.0-tempest-amd64.iso) | | You can read about differences between releases [here](https://github.com/irontec/ivozprovider/blob/bleeding/FAQ.md#what-release-should-i-use). @@ -81,7 +80,7 @@ Don't hesitate to [contact us](https://www.irontec.com/contacto) for support if ## License Ivoz Provider - Multitenant solution for VoIP telephony providers - Copyright (C) 2014-2018 Irontec S.L. + Copyright (C) 2014-2024 Irontec S.L. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/asterisk/agi/composer.json b/asterisk/agi/composer.json index dd12b51e34c..c95a31799f7 100644 --- a/asterisk/agi/composer.json +++ b/asterisk/agi/composer.json @@ -50,6 +50,9 @@ }, "platform": { "php": "8.0.9" + }, + "allow-plugins": { + "symfony/flex": true } }, "require": { diff --git a/asterisk/agi/composer.lock b/asterisk/agi/composer.lock index 3476677c307..d3b88913fac 100644 --- a/asterisk/agi/composer.lock +++ b/asterisk/agi/composer.lock @@ -194,24 +194,28 @@ }, { "name": "doctrine/annotations", - "version": "1.13.2", + "version": "1.14.3", "dist": { "type": "path", "url": "../../library/vendor/doctrine/annotations", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" }, "require": { - "doctrine/lexer": "1.*", + "doctrine/lexer": "^1 || ^2", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" }, "type": "library", "autoload": { @@ -1148,19 +1152,6 @@ "url": "../../library/vendor/doctrine/orm", "reference": "9c351e044478135aec1755e2c0c0493a4b6309db" }, - "archive": { - "exclude": [ - "!vendor", - "tests", - "*phpunit.xml", - "build.xml", - "build.properties", - "composer.phar", - "vendor/satooshi", - "lib/vendor", - "*.swp" - ] - }, "require": { "composer-runtime-api": "^2", "doctrine/cache": "^1.12.1 || ^2.1.1", @@ -1214,6 +1205,19 @@ "Doctrine\\Performance\\": "tests/Doctrine/Performance" } }, + "archive": { + "exclude": [ + "!vendor", + "tests", + "*phpunit.xml", + "build.xml", + "build.properties", + "composer.phar", + "vendor/satooshi", + "lib/vendor", + "*.swp" + ] + }, "license": [ "MIT" ], @@ -1886,11 +1890,11 @@ }, { "name": "irontec/ivoz-core", - "version": "4.17.0", + "version": "4.18.0", "dist": { "type": "path", "url": "../../library/vendor/irontec/ivoz-core", - "reference": "8a7d8e66fbf2b8e9ec40508a06ee1ce950df29f2" + "reference": "f39310b119f7924c5e9f098aea4252e2bd806086" }, "require": { "beberlei/assert": "^3.0", @@ -2006,11 +2010,11 @@ }, { "name": "irontec/ivoz-provider-bundle", - "version": "2.6.6", + "version": "2.6.7", "dist": { "type": "path", "url": "../../library/vendor/irontec/ivoz-provider-bundle", - "reference": "d5d10b403f411d7ea38a982e53eba5398a1c843e" + "reference": "d74e3d430e95fd72d5674551d11f42373f453c90" }, "require": { "beberlei/doctrineextensions": "^1.2", @@ -3277,7 +3281,7 @@ }, { "name": "symfony/cache-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "dist": { "type": "path", "url": "../../library/vendor/symfony/cache-contracts", @@ -3597,7 +3601,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", + "version": "v3.0.2", "dist": { "type": "path", "url": "../../library/vendor/symfony/deprecation-contracts", @@ -3643,15 +3647,15 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v5.4.7", + "version": "v5.4.24", "dist": { "type": "path", "url": "../../library/vendor/symfony/doctrine-bridge", - "reference": "8293adcd47c2a3195cfa5f511feebb12832c47b4" + "reference": "1eeb02bcad51cb99ab3b73bc83adf80f9b1a75cf" }, "require": { "doctrine/event-manager": "~1.0", - "doctrine/persistence": "^2", + "doctrine/persistence": "^2|^3", "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-ctype": "~1.8", @@ -3663,10 +3667,9 @@ "doctrine/dbal": "<2.13.1", "doctrine/lexer": "<1.1", "doctrine/orm": "<2.7.4", - "phpunit/phpunit": "<5.4.3", "symfony/cache": "<5.4", "symfony/dependency-injection": "<4.4", - "symfony/form": "<5.1", + "symfony/form": "<5.4.21|>=6,<6.2.7", "symfony/http-kernel": "<5", "symfony/messenger": "<4.4", "symfony/property-info": "<5", @@ -3676,8 +3679,8 @@ "symfony/validator": "<5.2" }, "require-dev": { - "doctrine/annotations": "^1.10.4", - "doctrine/collections": "~1.0", + "doctrine/annotations": "^1.10.4|^2", + "doctrine/collections": "^1.0|^2.0", "doctrine/data-fixtures": "^1.1", "doctrine/dbal": "^2.13.1|^3.0", "doctrine/orm": "^2.7.4", @@ -3687,7 +3690,7 @@ "symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/doctrine-messenger": "^5.1|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/form": "^5.1.3|^6.0", + "symfony/form": "^5.4.21|^6.2.7", "symfony/http-kernel": "^5.0|^6.0", "symfony/messenger": "^4.4|^5.0|^6.0", "symfony/property-access": "^4.4|^5.0|^6.0", @@ -3789,11 +3792,11 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.19", + "version": "v5.4.29", "dist": { "type": "path", "url": "../../library/vendor/symfony/error-handler", - "reference": "438ef3e5e6481244785da3ce8cf8f4e74e7f2822" + "reference": "328c6fcfd2f90b64c16efaf0ea67a311d672f078" }, "require": { "php": ">=7.2.5", @@ -3839,11 +3842,11 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.19", + "version": "v5.4.26", "dist": { "type": "path", "url": "../../library/vendor/symfony/event-dispatcher", - "reference": "abf49cc084c087d94b4cb939c3f3672971784e0c" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "require": { "php": ">=7.2.5", @@ -3903,7 +3906,7 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.1", + "version": "v3.0.2", "dist": { "type": "path", "url": "../../library/vendor/symfony/event-dispatcher-contracts", @@ -4131,11 +4134,11 @@ }, { "name": "symfony/form", - "version": "v5.4.7", + "version": "v5.4.33", "dist": { "type": "path", "url": "../../library/vendor/symfony/form", - "reference": "75267931833e98f82bc39fb20f54251b7516680b" + "reference": "9c13bf53e728d3f75ce7a36046ffc2cd0e7d25ec" }, "require": { "php": ">=7.2.5", @@ -4151,19 +4154,18 @@ "symfony/service-contracts": "^1.1|^2|^3" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4", "symfony/dependency-injection": "<4.4", - "symfony/doctrine-bridge": "<4.4", + "symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7", "symfony/error-handler": "<4.4.5", "symfony/framework-bundle": "<4.4", "symfony/http-kernel": "<4.4", "symfony/translation": "<4.4", "symfony/translation-contracts": "<1.1.7", - "symfony/twig-bridge": "<4.4" + "symfony/twig-bridge": "<5.4.21|>=6,<6.2.7" }, "require-dev": { - "doctrine/collections": "~1.0", + "doctrine/collections": "^1.0|^2.0", "symfony/config": "^4.4|^5.0|^6.0", "symfony/console": "^5.4|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", @@ -4343,11 +4345,11 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.20", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/http-foundation", - "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a" + "reference": "f84fd4fd8311a541ceb2ae3f257841d002450a90" }, "require": { "php": ">=7.2.5", @@ -4398,11 +4400,11 @@ }, { "name": "symfony/http-kernel", - "version": "v5.4.20", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/http-kernel", - "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e" + "reference": "d2fad58d32a7b4864d205a7289602a27ce75018c" }, "require": { "php": ">=7.2.5", @@ -4410,7 +4412,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^4.4|^5.0|^6.0", "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16" @@ -4544,11 +4546,11 @@ }, { "name": "symfony/mime", - "version": "v5.4.19", + "version": "v5.4.26", "dist": { "type": "path", "url": "../../library/vendor/symfony/mime", - "reference": "a858429a9c704edc53fe057228cf9ca282ba48eb" + "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2" }, "require": { "php": ">=7.2.5", @@ -4562,7 +4564,7 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4", - "symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6" + "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", @@ -4570,7 +4572,7 @@ "symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.4.14|~6.0.14|^6.1.6" + "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2" }, "type": "library", "autoload": { @@ -4777,21 +4779,22 @@ }, { "name": "symfony/password-hasher", - "version": "v5.4.3", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/password-hasher", - "reference": "b5ed59c4536d8386cd37bb86df2b7bd5fbbd46d4" + "reference": "f1a07181f3442836b0aadfd4c65841804d4173c4" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/security-core": "<5.3" }, "require-dev": { - "symfony/console": "^5", + "symfony/console": "^5.3|^6.0", "symfony/security-core": "^5.3|^6.0" }, "type": "library", @@ -4829,11 +4832,11 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-ctype", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "require": { "php": ">=7.1" @@ -4847,7 +4850,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4890,11 +4893,11 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-intl-grapheme", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "require": { "php": ">=7.1" @@ -4905,7 +4908,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4950,7 +4953,7 @@ }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.24.0", + "version": "v1.25.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-intl-icu", @@ -5016,11 +5019,11 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-intl-idn", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "require": { "php": ">=7.1", @@ -5033,7 +5036,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5082,11 +5085,11 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-intl-normalizer", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "require": { "php": ">=7.1" @@ -5097,7 +5100,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5145,11 +5148,11 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-mbstring", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "require": { "php": ">=7.1" @@ -5163,7 +5166,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5207,11 +5210,11 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-php72", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "require": { "php": ">=7.1" @@ -5219,7 +5222,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5262,11 +5265,11 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-php73", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "require": { "php": ">=7.1" @@ -5274,7 +5277,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5320,7 +5323,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "1.x-dev", + "version": "v1.28.0", "dist": { "type": "path", "url": "../../library/vendor/symfony/polyfill-php80", @@ -5440,11 +5443,11 @@ }, { "name": "symfony/property-access", - "version": "v5.4.19", + "version": "v5.4.26", "dist": { "type": "path", "url": "../../library/vendor/symfony/property-access", - "reference": "20fcf370aed6b2b4a2d8170fa23d2d07250e94ab" + "reference": "0249e46f69e92049a488f39fcf531cb42c50caaa" }, "require": { "php": ">=7.2.5", @@ -5490,7 +5493,7 @@ "injection", "object", "property", - "property path", + "property-path", "reflection" ], "transport-options": { @@ -5500,11 +5503,11 @@ }, { "name": "symfony/property-info", - "version": "v5.4.19", + "version": "v5.4.24", "dist": { "type": "path", "url": "../../library/vendor/symfony/property-info", - "reference": "8ccf54bce2e2edbface1e99cb5a2560a290c9e2d" + "reference": "d43b85b00699b4484964c297575b5c6f9dc5f6e1" }, "require": { "php": ">=7.2.5", @@ -5556,8 +5559,8 @@ "description": "Extracts information about PHP class' properties using metadata of popular sources", "homepage": "https://symfony.com", "keywords": [ - "PHPDoc", "doctrine", + "phpdoc", "property", "symfony", "type", @@ -5766,11 +5769,11 @@ }, { "name": "symfony/security-core", - "version": "v5.4.22", + "version": "v5.4.30", "dist": { "type": "path", "url": "../../library/vendor/symfony/security-core", - "reference": "a801d525c7545332e2ddf7f52c163959354b1650" + "reference": "3908c54da30dd68c2fe31915d82a1c81809d1928" }, "require": { "php": ">=7.2.5", @@ -5935,11 +5938,11 @@ }, { "name": "symfony/security-http", - "version": "v5.4.26", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/security-http", - "reference": "9291eec227de5179eb0a1b60cc6265ee6f987b4a" + "reference": "6d3cd5a4deee9697738db8d24258890ca4140ae9" }, "require": { "php": ">=7.2.5", @@ -5949,7 +5952,8 @@ "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "^1.16", "symfony/property-access": "^4.4|^5.0|^6.0", - "symfony/security-core": "^5.4.19|~6.0.19|~6.1.11|^6.2.5" + "symfony/security-core": "^5.4.19|~6.0.19|~6.1.11|^6.2.5", + "symfony/service-contracts": "^1.10|^2|^3" }, "conflict": { "symfony/event-dispatcher": "<4.3", @@ -5999,11 +6003,11 @@ }, { "name": "symfony/serializer", - "version": "v5.4.19", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/serializer", - "reference": "2139fa01c19a764af81191d635b2b9302f4bafd8" + "reference": "15574cfa408a6082b6d66c2b6922f95db6cab26d" }, "require": { "php": ">=7.2.5", @@ -6014,10 +6018,10 @@ "conflict": { "doctrine/annotations": "<1.12", "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0|>=1.7.0", + "phpdocumentor/type-resolver": "<1.4.0", "symfony/dependency-injection": "<4.4", "symfony/property-access": "<5.4", - "symfony/property-info": "<5.3.13", + "symfony/property-info": "<5.4.24|>=6,<6.2.11", "symfony/uid": "<5.3", "symfony/yaml": "<4.4" }, @@ -6034,7 +6038,7 @@ "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/mime": "^4.4|^5.0|^6.0", "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.3.13|^6.0", + "symfony/property-info": "^5.4.24|^6.2.11", "symfony/uid": "^5.3|^6.0", "symfony/validator": "^4.4|^5.0|^6.0", "symfony/var-dumper": "^4.4|^5.0|^6.0", @@ -6184,11 +6188,11 @@ }, { "name": "symfony/string", - "version": "v5.4.19", + "version": "v5.4.31", "dist": { "type": "path", "url": "../../library/vendor/symfony/string", - "reference": "0a01071610fd861cc160dfb7e2682ceec66064cb" + "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" }, "require": { "php": ">=7.2.5", @@ -6429,11 +6433,11 @@ }, { "name": "symfony/twig-bridge", - "version": "v5.4.7", + "version": "v5.4.34", "dist": { "type": "path", "url": "../../library/vendor/symfony/twig-bridge", - "reference": "b43e9bdb57a39ffffb4c44a7ef0a47d338e9f1da" + "reference": "4ced0e91705d689b77763678367bd522d79f9f9a" }, "require": { "php": ">=7.2.5", @@ -6445,22 +6449,22 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/console": "<5.3", - "symfony/form": "<5.3", + "symfony/form": "<5.4.21|>=6,<6.2.7", "symfony/http-foundation": "<5.3", "symfony/http-kernel": "<4.4", "symfony/translation": "<5.2", "symfony/workflow": "<5.2" }, "require-dev": { - "doctrine/annotations": "^1.12", - "egulias/email-validator": "^2.1.10|^3", + "doctrine/annotations": "^1.12|^2", + "egulias/email-validator": "^2.1.10|^3|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/asset": "^4.4|^5.0|^6.0", "symfony/console": "^5.3|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/form": "^5.3|^6.0", + "symfony/form": "^5.4.21|^6.2.7", "symfony/http-foundation": "^5.3|^6.0", "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/intl": "^4.4|^5.0|^6.0", @@ -6689,11 +6693,11 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.19", + "version": "v5.4.29", "dist": { "type": "path", "url": "../../library/vendor/symfony/var-dumper", - "reference": "2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b" + "reference": "6172e4ae3534d25ee9e07eb487c20be7760fcc65" }, "require": { "php": ">=7.2.5", @@ -6701,12 +6705,12 @@ "symfony/polyfill-php80": "^1.16" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", "symfony/console": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -6863,27 +6867,23 @@ }, { "name": "twig/twig", - "version": "v3.4.3", + "version": "v3.8.0", "dist": { "type": "path", "url": "../../library/vendor/twig/twig", - "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Twig\\": "src/" @@ -6936,5 +6936,5 @@ "platform-overrides": { "php": "8.0.9" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/asterisk/agi/phpstan-baseline.neon b/asterisk/agi/phpstan-baseline.neon index ae120538ef8..5a56dca27b8 100644 --- a/asterisk/agi/phpstan-baseline.neon +++ b/asterisk/agi/phpstan-baseline.neon @@ -710,11 +710,6 @@ parameters: count: 1 path: src/Agi/Action/VoicemailAction.php - - - message: "#^Method Agi\\\\Agents\\\\DdiAgent\\:\\:getId\\(\\) should return string but returns int\\|null\\.$#" - count: 1 - path: src/Agi/Agents/DdiAgent.php - - message: "#^Method Agi\\\\Agents\\\\DdiAgent\\:\\:getPickupGroups\\(\\) has no return typehint specified\\.$#" count: 1 @@ -750,11 +745,6 @@ parameters: count: 1 path: src/Agi/Agents/FriendAgent.php - - - message: "#^Method Agi\\\\Agents\\\\FriendAgent\\:\\:getId\\(\\) should return string but returns int\\|null\\.$#" - count: 1 - path: src/Agi/Agents/FriendAgent.php - - message: "#^Method Agi\\\\Agents\\\\FriendAgent\\:\\:getPickupGroups\\(\\) has no return typehint specified\\.$#" count: 1 @@ -770,11 +760,6 @@ parameters: count: 1 path: src/Agi/Agents/ResidentialAgent.php - - - message: "#^Method Agi\\\\Agents\\\\ResidentialAgent\\:\\:getId\\(\\) should return string but returns int\\|null\\.$#" - count: 1 - path: src/Agi/Agents/ResidentialAgent.php - - message: "#^Method Agi\\\\Agents\\\\ResidentialAgent\\:\\:getPickupGroups\\(\\) has no return typehint specified\\.$#" count: 1 @@ -785,11 +770,6 @@ parameters: count: 1 path: src/Agi/Agents/ResidentialAgent.php - - - message: "#^Method Agi\\\\Agents\\\\RetailAgent\\:\\:getId\\(\\) should return string but returns int\\|null\\.$#" - count: 1 - path: src/Agi/Agents/RetailAgent.php - - message: "#^Method Agi\\\\Agents\\\\RetailAgent\\:\\:getPickupGroups\\(\\) has no return typehint specified\\.$#" count: 1 @@ -810,11 +790,6 @@ parameters: count: 1 path: src/Agi/Agents/UserAgent.php - - - message: "#^Method Agi\\\\Agents\\\\UserAgent\\:\\:getId\\(\\) should return string but returns int\\|null\\.$#" - count: 1 - path: src/Agi/Agents/UserAgent.php - - message: "#^Method Agi\\\\Agents\\\\UserAgent\\:\\:getPickUpGroups\\(\\) should return array\\\\|null but returns array\\\\.$#" count: 1 diff --git a/asterisk/agi/src/Agi/Agents/AgentInterface.php b/asterisk/agi/src/Agi/Agents/AgentInterface.php index f0361b5a148..7f635b75c24 100644 --- a/asterisk/agi/src/Agi/Agents/AgentInterface.php +++ b/asterisk/agi/src/Agi/Agents/AgentInterface.php @@ -27,7 +27,7 @@ public function isEqual(AgentInterface $other); public function getType(); /** - * @return string + * @return int|null */ public function getId(); diff --git a/asterisk/config/pjsip.conf b/asterisk/config/pjsip.conf index 168a9e422da..d6665c73228 100644 --- a/asterisk/config/pjsip.conf +++ b/asterisk/config/pjsip.conf @@ -3,7 +3,7 @@ ;; [global] type=global -user_agent=Irontec IvozProvider v3.4 +user_agent=Irontec IvozProvider v4.0 endpoint_identifier_order=ip,header,username,anonymous ;; diff --git a/debian/Dockerfile b/debian/Dockerfile index 6567c291997..fb1ea3a43ce 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,13 +1,11 @@ -FROM debian:bullseye +FROM debian:bookworm MAINTAINER Mikel Madariaga MAINTAINER Ivan Alonso RUN apt-get update && apt-get -y install gnupg wget -RUN echo deb http://packages.irontec.com/debian halliday main extra >> \ - /etc/apt/sources.list -RUN echo deb http://ftp.debian.org/debian bullseye-backports main contrib non-free >> \ +RUN echo deb http://packages.irontec.com/debian tempest main extra >> \ /etc/apt/sources.list RUN wget http://packages.irontec.com/public.key -q -O - | apt-key add - @@ -20,30 +18,28 @@ RUN apt-get update && apt-get install -y \ debhelper \ gettext \ git \ + golang \ libjs-sphinxdoc \ libjs-jquery \ make \ + npm \ nodejs \ openssh-client \ - php8.0 \ - php8.0-cli \ - php8.0-common \ - php8.0-mbstring \ - php8.0-xml \ - php8.0-zip \ - php8.0-mailparse \ - php8.0-readline \ - php8.0-gearman \ - python \ + php8.2 \ + php8.2-cli \ + php8.2-common \ + php8.2-mbstring \ + php8.2-xml \ + php8.2-zip \ + php8.2-mailparse \ + php8.2-readline \ + php8.2-gearman \ + python3 \ python3-sphinx-rtd-theme \ ruby-dev \ sphinx-common \ yarn -# Packages from backports -RUN apt-get install -y -t bullseye-backports \ - golang - # Create jenkins user (configurable) ARG UNAME=jenkins ARG UID=108 diff --git a/debian/changelog b/debian/changelog index a36aee6ee21..972805aa2ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -ivozprovider (3.4~3.4.0) UNRELEASED; urgency=medium +ivozprovider (4.0~4.0.0) UNRELEASED; urgency=medium + + * Version bump to 4.0.0 + + -- Irontec IvozProvider Team Mon, 20 Nov 2023 10:52:11 +0100 + +ivozprovider (3.4~3.4.0) unstable; urgency=medium * Version bump to 3.4.0 diff --git a/debian/control b/debian/control index 95bae0fb9b4..72402223b62 100644 --- a/debian/control +++ b/debian/control @@ -10,16 +10,17 @@ Build-Depends: debhelper (>=9.2), libjs-sphinxdoc (>=1.4.6), make, nodejs, + npm, openssh-client, - php8.0, - php8.0-cli, - php8.0-common, - php8.0-mailparse, - php8.0-mbstring, - php8.0-opcache, - php8.0-readline, - php8.0-xml, - php8.0-zip, + php8.2, + php8.2-cli, + php8.2-common, + php8.2-mailparse, + php8.2-mbstring, + php8.2-opcache, + php8.2-readline, + php8.2-xml, + php8.2-zip, python3, python3-alabaster (>=0.7.8), python3-sphinx (>=1.4.6), @@ -67,13 +68,13 @@ Package: ivozprovider-profile-as Architecture: all Section: admin Priority: optional -Pre-Depends: libmyodbc, unixodbc Depends: ivozprovider-profile-common (=${binary:Version}), ivozprovider-asterisk-agi (=${binary:Version}), ivozprovider-asterisk-config (=${binary:Version}), ivozprovider-asterisk-sounds, ivozprovider-asterisk, - php8.0-igbinary, + php8.2-igbinary, + odbc-mariadb, sngrep, ghostscript, libtiff-tools @@ -89,7 +90,7 @@ Pre-Depends: bind9, mysql-server Depends: ivozprovider-profile-common (=${binary:Version}), ivozprovider-schema (=${binary:Version}), ivozprovider-balances (=${binary:Version}), - python3-mysql.connector, + python3-pymysql, libstring-crc32-perl, redis-server, redis-sentinel @@ -106,19 +107,20 @@ Depends: ivozprovider-profile-common (=${binary:Version}), ivozprovider-async-workers (=${binary:Version}), ivozprovider-scheduler (=${binary:Version}), ivozprovider-realtime (=${binary:Version}), + ivozprovider-router (=${binary:Version}), apache2, ssl-cert, ghostscript, - php8.0, - php8.0-fpm, - php8.0-igbinary, - php8.0-mysql, - php8.0-imagick, - php8.0-mbstring, - php8.0-curl, - php8.0-yaml, - php8.0-gd, - php8.0-zip, + php8.2, + php8.2-fpm, + php8.2-igbinary, + php8.2-mysql, + php8.2-imagick, + php8.2-mbstring, + php8.2-curl, + php8.2-yaml, + php8.2-gd, + php8.2-zip, ivozprovider-web-admin (=${binary:Version}), ivozprovider-web-user (=${binary:Version}), ivozprovider-web-portals (=${binary:Version}), @@ -209,7 +211,7 @@ Package: ivozprovider-schema Architecture: all Section: database Priority: optional -Pre-Depends: ivozprovider-common-library (=${binary:Version}), bind9, php8.0-mysql, php8.0-xml, mysql-server +Pre-Depends: ivozprovider-common-library (=${binary:Version}), bind9, php8.2-mysql, php8.2-xml, mysql-server Conflicts: ivozprovider-scheme Homepage: http://www.irontec.com Description: IVOZ Provider - Database Scheme @@ -252,7 +254,7 @@ Package: ivozprovider-web-rest Architecture: all Section: php Priority: optional -Depends: ivozprovider-common-library (=${binary:Version}), apache2, libapache2-mod-php8.0 +Depends: ivozprovider-common-library (=${binary:Version}), apache2, libapache2-mod-php8.2 Homepage: http://www.irontec.com Description: IVOZ Provider - Rest API files . @@ -260,7 +262,7 @@ Description: IVOZ Provider - Rest API files Package: ivozprovider-common-library Architecture: all Section: php -Depends: php8.0-cli, php8.0-mysql, php8.0-mbstring, php8.0-xml, acl, klear-library, php8.0-mailparse, php8.0-intl, php8.0-redis +Depends: php8.2-cli, php8.2-mysql, php8.2-mbstring, php8.2-xml, acl, klear-library, php8.2-mailparse, php8.2-intl, php8.2-redis Provides: ivozprovider-data-library Conflicts: ivozprovider-data-library Priority: optional @@ -314,7 +316,7 @@ Description: IVOZ Provider - Rating updater - Symfony microservice Package: ivozprovider-realtime Architecture: all Priority: optional -Depends: ivozprovider-common-library (=${binary:Version}), php8.0-redis, php8.0-swoole +Depends: ivozprovider-common-library (=${binary:Version}), php8.2-redis Homepage: http://www.irontec.com Description: IVOZ Provider - Realtime Websocket server - Symfony microservice . diff --git a/debian/ivozprovider-profile-as.postinst b/debian/ivozprovider-profile-as.postinst index 49618500e4f..3fa87653092 100755 --- a/debian/ivozprovider-profile-as.postinst +++ b/debian/ivozprovider-profile-as.postinst @@ -11,8 +11,8 @@ function setup_php() { # Enable php environment variables - /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.0/cli/php.ini - /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.0/cli/php.ini + /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/cli/php.ini + /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.2/cli/php.ini } function setup_mysql_access() diff --git a/debian/ivozprovider-profile-portal.postinst b/debian/ivozprovider-profile-portal.postinst index 14b47517226..08d8f023927 100755 --- a/debian/ivozprovider-profile-portal.postinst +++ b/debian/ivozprovider-profile-portal.postinst @@ -35,7 +35,7 @@ function setup_apache_config() # Disable not required apache modules /usr/sbin/a2dismod -q mpm_prefork /usr/sbin/a2dismod -q mpm_worker - /usr/sbin/a2dismod -q php8.0 + /usr/sbin/a2dismod -q php8.2 # Enable required apache modules /usr/sbin/a2enmod -q mpm_event @@ -50,7 +50,7 @@ function setup_apache_config() # Enable required apache configuration /usr/sbin/a2enconf -q realtime - /usr/sbin/a2enconf -q php8.0-fpm + /usr/sbin/a2enconf -q php8.2-fpm # Configure apache sites /usr/sbin/a2dissite -q 000-default @@ -70,18 +70,18 @@ function setup_apache_config() function setup_php() { # Enable php environment variables - /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.0/cli/php.ini - /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.0/cli/php.ini - /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.0/apache2/php.ini - /bin/sed -i 's/upload_max_filesize = [0-9]\+M/upload_max_filesize = 30M/g' /etc/php/8.0/apache2/php.ini - /bin/sed -i 's/post_max_size = [0-9]\+M/post_max_size = 30M/g' /etc/php/8.0/apache2/php.ini - /bin/sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/8.0/apache2/php.ini - /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.0/apache2/php.ini - /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.0/fpm/php.ini - /bin/sed -i 's/upload_max_filesize = [0-9]\+M/upload_max_filesize = 30M/g' /etc/php/8.0/fpm/php.ini - /bin/sed -i 's/post_max_size = [0-9]\+M/post_max_size = 30M/g' /etc/php/8.0/fpm/php.ini - /bin/sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/8.0/fpm/php.ini - /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.0/fpm/php.ini + /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/cli/php.ini + /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.2/cli/php.ini + /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/apache2/php.ini + /bin/sed -i 's/upload_max_filesize = [0-9]\+M/upload_max_filesize = 30M/g' /etc/php/8.2/apache2/php.ini + /bin/sed -i 's/post_max_size = [0-9]\+M/post_max_size = 30M/g' /etc/php/8.2/apache2/php.ini + /bin/sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/8.2/apache2/php.ini + /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.2/apache2/php.ini + /bin/sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php/8.2/fpm/php.ini + /bin/sed -i 's/upload_max_filesize = [0-9]\+M/upload_max_filesize = 30M/g' /etc/php/8.2/fpm/php.ini + /bin/sed -i 's/post_max_size = [0-9]\+M/post_max_size = 30M/g' /etc/php/8.2/fpm/php.ini + /bin/sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/8.2/fpm/php.ini + /bin/sed -i 's/;*date.timezone =.*/date.timezone = UTC/g' /etc/php/8.2/fpm/php.ini } function setup_klear() diff --git a/debian/ivozprovider-profile-proxy.postinst b/debian/ivozprovider-profile-proxy.postinst index cb6d2873e2a..a19b36eb5d5 100644 --- a/debian/ivozprovider-profile-proxy.postinst +++ b/debian/ivozprovider-profile-proxy.postinst @@ -24,10 +24,10 @@ function setup_media_relays() # Configure Media relay IPs - sed -i -r "s/(interface *= *).*/\1$MEDIA_RELAY_ADDRESS/" /etc/rtpengine/rtpengine.conf - sed -i -r "s/(listen-ng *= *).*/\1$MEDIA_RELAY_CONTROL:2223/" /etc/rtpengine/rtpengine.conf - sed -i -r "s/(port-min *= *).*/\1$MEDIA_RELAY_MINPORT/" /etc/rtpengine/rtpengine.conf - sed -i -r "s/(port-max *= *).*/\1$MEDIA_RELAY_MAXPORT/" /etc/rtpengine/rtpengine.conf + sed -i -r "s#(interface *= *).*#\1$MEDIA_RELAY_ADDRESS#" /etc/rtpengine/rtpengine.conf + sed -i -r "s#(listen-ng *= *).*#\1$MEDIA_RELAY_CONTROL:2223#" /etc/rtpengine/rtpengine.conf + sed -i -r "s#(port-min *= *).*#\1$MEDIA_RELAY_MINPORT#" /etc/rtpengine/rtpengine.conf + sed -i -r "s#(port-max *= *).*#\1$MEDIA_RELAY_MAXPORT#" /etc/rtpengine/rtpengine.conf } function setup_mysql_access() @@ -36,8 +36,8 @@ function setup_mysql_access() MYSQL_PWD=$RET # Replace password in configuration files - sed -i -r "s/(password *= *).*/\1$MYSQL_PWD/" /etc/mysql/conf.d/kamailio.cnf - sed -i -r "s/(\"db_password\": *)\".+\"/\1\"$MYSQL_PWD\"/" /etc/cgrates/cgrates.json + sed -i -r "s#(password *= *).*#\1$MYSQL_PWD#" /etc/mysql/conf.d/kamailio.cnf + sed -i -r "s#(\"db_password\": *)\".+\"#\1\"$MYSQL_PWD\"#" /etc/cgrates/cgrates.json } ####################################################################################################################### diff --git a/debian/ivozprovider-scheduler.install b/debian/ivozprovider-scheduler.install index bbd9931df4f..8803350941e 100644 --- a/debian/ivozprovider-scheduler.install +++ b/debian/ivozprovider-scheduler.install @@ -2,3 +2,4 @@ microservices/scheduler /opt/irontec/ivozprovider/microservices/ debian/systemd/ivozprovider-scheduler.timer /lib/systemd/system debian/systemd/ivozprovider-scheduler-historic-calls.timer /lib/systemd/system debian/systemd/ivozprovider-cdrs.timer /lib/systemd/system +debian/systemd/ivozprovider-users-cdrs.timer /lib/systemd/system diff --git a/debian/ivozprovider-scheduler.ivozprovider-users-cdrs.service b/debian/ivozprovider-scheduler.ivozprovider-users-cdrs.service new file mode 120000 index 00000000000..9e76ecb1417 --- /dev/null +++ b/debian/ivozprovider-scheduler.ivozprovider-users-cdrs.service @@ -0,0 +1 @@ +systemd/ivozprovider-users-cdrs.service \ No newline at end of file diff --git a/debian/ivozprovider.postinst b/debian/ivozprovider.postinst index 1a9b3cd1930..4bbe606f0a1 100755 --- a/debian/ivozprovider.postinst +++ b/debian/ivozprovider.postinst @@ -170,6 +170,7 @@ function enable_services() /bin/systemctl enable ivozprovider-scheduler.timer /bin/systemctl enable ivozprovider-scheduler-historic-calls.timer /bin/systemctl enable ivozprovider-cdrs.timer + /bin/systemctl enable ivozprovider-users-cdrs.timer /bin/systemctl enable cgrates } diff --git a/debian/rules b/debian/rules index 615cd4e42bc..6f600fb2716 100644 --- a/debian/rules +++ b/debian/rules @@ -79,6 +79,7 @@ override_dh_systemd_enable: dh_systemd_enable -p ivozprovider-scheduler --name=ivozprovider-scheduler --no-enable dh_systemd_enable -p ivozprovider-scheduler --name=ivozprovider-cdrs --no-enable dh_systemd_enable -p ivozprovider-scheduler --name=ivozprovider-scheduler-historic-calls --no-enable + dh_systemd_enable -p ivozprovider-scheduler --name=ivozprovider-user-cdrs --no-enable override_dh_systemd_start: dh_systemd_start -p ivozprovider-asterisk-agi --name=fastagi@ fastagi@.service --no-restart-on-upgrade --no-start @@ -92,6 +93,7 @@ override_dh_systemd_start: dh_systemd_start -p ivozprovider-scheduler --name=ivozprovider-scheduler --no-restart-on-upgrade --no-start dh_systemd_start -p ivozprovider-scheduler --name=ivozprovider-cdrs --no-restart-on-upgrade --no-start dh_systemd_start -p ivozprovider-scheduler --name=ivozprovider-scheduler-historic-calls --no-restart-on-upgrade --no-start + dh_systemd_start -p ivozprovider-scheduler --name=ivozprovider-users-cdrs --no-restart-on-upgrade --no-start # Install /etc/default configuration override_dh_installinit: diff --git a/debian/systemd/ivozprovider-users-cdrs.service b/debian/systemd/ivozprovider-users-cdrs.service new file mode 100644 index 00000000000..1d3e30fe037 --- /dev/null +++ b/debian/systemd/ivozprovider-users-cdrs.service @@ -0,0 +1,7 @@ +[Unit] +Description=Ivozprovider Users CDR mixer + +[Service] +Type=oneshot +User=root +ExecStart=/opt/irontec/ivozprovider/microservices/scheduler/bin/run-users-cdrs diff --git a/debian/systemd/ivozprovider-users-cdrs.timer b/debian/systemd/ivozprovider-users-cdrs.timer new file mode 100644 index 00000000000..9967ae05d00 --- /dev/null +++ b/debian/systemd/ivozprovider-users-cdrs.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Ivozprovider Users CDR mixer + +[Timer] +OnBootSec=3min +OnUnitActiveSec=1min + +[Install] +WantedBy=timers.target diff --git a/doc/generate.sh b/doc/generate.sh index fc1f0c617a8..bedf36ad4f7 100755 --- a/doc/generate.sh +++ b/doc/generate.sh @@ -4,17 +4,17 @@ mkdir -p /opt/irontec/ghpages/ # Regenerate sphinx documentation -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/en -wartemis -woasis -wbleeding -whalliday -Wx -- -D"language=en" -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/es -wartemis -woasis -wbleeding -whalliday -Wx -- -D"language=es" -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/ensingle -wartemis -woasis -wbleeding -whalliday -Wx -- -D"language=en" -b singlehtml -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/essingle -wartemis -woasis -wbleeding -whalliday -Wx -- -D"language=es" -b singlehtml -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/enlatex -wartemis -woasis -whalliday -Wx -- -D"language=en" -b latex -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/eslatex -wartemis -woasis -whalliday -Wx -- -D"language=es" -b latex -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/enepub -wartemis -woasis -whalliday -Wx -- -D"language=en" -b epub -sphinx-versioning build -r artemis doc/sphinx /opt/irontec/ghpages/esepub -wartemis -woasis -whalliday -Wx -- -D"language=es" -b epub +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/en -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=en" +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/es -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=es" +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/ensingle -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=en" -b singlehtml +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/essingle -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=es" -b singlehtml +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/enlatex -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=en" -b latex +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/eslatex -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=es" -b latex +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/enepub -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=en" -b epub +sphinx-versioning build -r tempest doc/sphinx /opt/irontec/ghpages/esepub -woasis -wartemis -whalliday -wtempest -wbleeding -Wx -- -D"language=es" -b epub # Generate PDF from latex build -for RELEASE in oasis artemis halliday; do +for RELEASE in oasis artemis halliday tempest; do for LANG in es en; do pushd /opt/irontec/ghpages/${LANG}latex/${RELEASE} pdflatex -interaction nonstopmode IvozProvider.tex > /dev/null || true diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index a4591956f32..af31ef647bf 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -73,7 +73,7 @@ # built documents. # # The short X.Y version. -version = "3.4" +version = "4.0" # The full version, including alpha/beta/rc tags. release = 'halliday' @@ -277,7 +277,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'IvozProvider.tex', 'IvozProvider 3.4 Documentation', + (master_doc, 'IvozProvider.tex', 'IvozProvider 4.0 Documentation', 'Irontec', 'manual'), ] diff --git a/extra/simple-cdd/Dockerfile b/extra/simple-cdd/Dockerfile index 0c74369ef08..ca8183babf7 100644 --- a/extra/simple-cdd/Dockerfile +++ b/extra/simple-cdd/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye +FROM debian:bookworm MAINTAINER Irontec IvozProvider Team diff --git a/extra/simple-cdd/generate-iso.sh b/extra/simple-cdd/generate-iso.sh index 83312882f8e..0271a17bddf 100755 --- a/extra/simple-cdd/generate-iso.sh +++ b/extra/simple-cdd/generate-iso.sh @@ -2,17 +2,17 @@ echo Building ISO Image for amd64 # Add IvozProvider repositories -echo deb http://packages.irontec.com/debian halliday main extra | sudo tee -a /etc/apt/sources.list +echo deb http://packages.irontec.com/debian tempest main extra | sudo tee -a /etc/apt/sources.list echo deb http://packages.irontec.com/debian tayler main extra | sudo tee -a /etc/apt/sources.list -wget http://packages.irontec.com/public.key -q -O - | sudo apt-key add - +sudo wget http://packages.irontec.com/public.key -q -O /etc/apt/trusted.gpg.d/irontec-debian-repository.asc # Update apt-cache sudo apt-get update # Download ivozprovider packages for given release pushd local -cat ../package.list | xargs apt-get download -t halliday +cat ../package.list | xargs apt-get download -t tempest popd # Generate iso file -build-simple-cdd --dvd --force-root --conf simple-cdd.conf --verbose --force-preseed --dist bullseye +build-simple-cdd --dvd --force-root --conf simple-cdd.conf --verbose --force-preseed --dist bookworm diff --git a/extra/simple-cdd/package.list b/extra/simple-cdd/package.list index bfef00af84d..ec11ebe5501 100644 --- a/extra/simple-cdd/package.list +++ b/extra/simple-cdd/package.list @@ -52,48 +52,20 @@ ivozprovider-web-user klear klear-library klear-matrix -libapache2-mod-php8.0 libbcg729-0 libbcg729-dev libgd3 -libicu65 -libmyodbc -libmyodbc-dbgsym -libmysqlclient20 -libmysqlclient-dev -libmysqld-dev +odbc-mariadb +libperconaserverclient21 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 -libpcre2-dev -libpcre2-posix2 +libpcre2-posix3 +libssl1.1 libzip4 mysql-common percona-server-client percona-server-common percona-server-server -php8.0 -php8.0-cli -php8.0-common -php8.0-curl -php8.0-dev -php8.0-fpm -php8.0-gd -php8.0-gearman -php8.0-igbinary -php8.0-imagick -php8.0-intl -php8.0-mailparse -php8.0-mbstring -php8.0-mysql -php8.0-opcache -php8.0-readline -php8.0-redis -php8.0-sqlite3 -php8.0-swoole -php8.0-xdebug -php8.0-xml -php8.0-yaml -php8.0-zip -python3-mysql.connector +python3-pymysql zendframework diff --git a/kamailio/trunks/config/kamailio.cfg b/kamailio/trunks/config/kamailio.cfg index 4d3eab08ab3..0e6bca5dcb1 100644 --- a/kamailio/trunks/config/kamailio.cfg +++ b/kamailio/trunks/config/kamailio.cfg @@ -133,8 +133,8 @@ log_facility=LOG_LOCAL0 onsend_route_reply=yes # Add custom Server header -server_header="Server: Irontec IvozProvider v3.4" -user_agent_header="User-Agent: Irontec IvozProvider v3.4" +server_header="Server: Irontec IvozProvider v4.0" +user_agent_header="User-Agent: Irontec IvozProvider v4.0" ####### Modules Section ######## @@ -539,10 +539,6 @@ request_route { remove_hf_re("^X-"); # Remove X-HEADERS from carriers route(GET_INFO_FROM_MATCHED_DDI); route(CONTROL_MAXCALLS); - #!ifdef WITH_MULTISOCKET - # force_send_socket to main address - $fs = "udp:" + $var(trunksAddress) + ":5060"; - #!endif route(DISPATCH); route(RTPENGINE); } else { @@ -1010,7 +1006,7 @@ route[SELECT_NEXT_GW] { } # Obtain info about selected GW - sql_xquery("cb", "SELECT C.mediaRelaySetsId, C.calculateCost, CS.sendPAI, CS.sendRPID, CS.authNeeded, CS.authUser, CS.authPassword, CS.carrierId, CS.fromUser, CS.fromDomain, PT.ip FROM CarrierServers CS JOIN Carriers C ON CS.carrierId=C.id LEFT JOIN ProxyTrunks PT ON PT.id=C.proxyTrunkId WHERE CS.id=$avp(carrierServerId)", "ra"); + sql_xquery("cb", "SELECT C.mediaRelaySetsId, C.calculateCost, CS.sendPAI, CS.sendRPID, CS.authNeeded, CS.authUser, CS.authPassword, CS.carrierId, CS.fromUser, CS.fromDomain, PT.ip, CS.transport FROM CarrierServers CS JOIN Carriers C ON CS.carrierId=C.id LEFT JOIN ProxyTrunks PT ON PT.id=C.proxyTrunkId WHERE CS.id=$avp(carrierServerId)", "ra"); if ( $(xavp(ra=>carrierId){s.len}) ) { $dlg_var(carrierId) = $xavp(ra=>carrierId); @@ -1062,15 +1058,16 @@ route[SELECT_NEXT_GW] { $avp(send_pai) = $xavp(ra=>sendPAI); $avp(send_rpid) = $xavp(ra=>sendRPID); - #!ifdef WITH_MULTISOCKET + # force_send_socket to carrier-server socket if ($xavp(ra=>ip) != $null) { - $avp(forceIP) = $xavp(ra=>ip); + $avp(carrierSocketIp) = $xavp(ra=>ip); } else { - $avp(forceIP) = $var(trunksAddress); + $avp(carrierSocketIp) = $var(trunksAddress); } - # force_send_socket to $avp(forceIP) - $fs = "udp:" + $avp(forceIP) + ":5060"; - #!endif + + $var(carrierSocketTransport) = $xavp(ra=>transport); + route(FORCE_CARRIER_SOCKET); + $dlg_var(externalSocket) = $avp(carrierSocketIp); # Reset auth flag $avp(auth_done) = '0'; @@ -1256,6 +1253,8 @@ route[MATCH_DDI] { exit; } + $dlg_var(externalSocket) = $Ri; + xnotice("[$dlg_var(cidhash)] MATCH-DDI: $rU recognized as $var(transformated) (b$dlg_var(brandId)c$dlg_var(companyId)ddi$dlg_var(ddiId)dp$dlg_var(ddiProviderId))\n"); } @@ -1304,7 +1303,11 @@ route[TRANSFORMATE_IN] { route(APPLY_TRANSFORMATION); # Apply $var(transformation) to $var(number) remove_hf_value("Diversion[0]"); - add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $(di{uri.host})); + if ($(di{uri.host}{s.len}) > 0) { + add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $(di{uri.host})); + } else { + add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $fd); + } $dlg_var(diversion) = $var(transformated); # Save for CDR } } @@ -1441,8 +1444,10 @@ route[TRANSFORMATE_OUT] { remove_hf_value("Diversion[0]"); if ($dlg_var(companyDomain) != $null) { add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $dlg_var(companyDomain)); - } else { + } else if ($(di{uri.host}{s.len}) > 0) { add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $(di{uri.host})); + } else { + add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $fd); } } } @@ -1578,6 +1583,11 @@ route[WITHINDLG] { } route[DISPATCH] { + if ($Ri != $var(trunksAddress)) { + # force_send_socket to main address + $fs = "udp:" + $var(trunksAddress) + ":5060"; + } + if ($dlg_var(type) == 'retail') { # Route to KamUsers xinfo("[$dlg_var(cidhash)] DISPATCH: Calling to retail account, route to KamUsers\n"); @@ -1799,10 +1809,17 @@ route[SAVE_CONTACT] { # This route sets $avp(carrier) and $avp(carrierServer) of given $avp(gateway) route[GET_INFO_FROM_GATEWAY] { $xavp(gw) = $null; - sql_xquery("cb", "SELECT CS.carrierId, CS.id AS carrierServerId, PT.ip AS localSocket FROM kam_trunks_lcr_gateways KTLG JOIN CarrierServers CS ON CS.id=KTLG.carrierServerId JOIN Carriers C ON C.id=CS.carrierId JOIN ProxyTrunks PT ON PT.id=C.proxyTrunkId WHERE KTLG.id=$avp(gateway)", "gw"); + sql_xquery("cb", "SELECT CS.carrierId, CS.id AS carrierServerId, PT.ip AS localSocket, CS.transport FROM kam_trunks_lcr_gateways KTLG JOIN CarrierServers CS ON CS.id=KTLG.carrierServerId JOIN Carriers C ON C.id=CS.carrierId JOIN ProxyTrunks PT ON PT.id=C.proxyTrunkId WHERE KTLG.id=$avp(gateway)", "gw"); $avp(carrier) = $xavp(gw=>carrierId); $avp(carrierServer) = $xavp(gw=>carrierServerId); - $avp(localSocket) = $xavp(gw=>localSocket); + + if ($xavp(gw=>localSocket) != $null) { + $avp(carrierSocketIp) = $xavp(gw=>localSocket); + } else { + $avp(carrierSocketIp) = $var(trunksAddress); + } + + $var(carrierSocketTransport) = $xavp(gw=>transport); } #!ifdef WITH_REALTIME @@ -2018,9 +2035,8 @@ failure_route[MANAGE_FAILURE_GW] { # Restore rU as it will be transformed again $rU = $avp(ruri_user_avp); - #!ifdef WITH_MULTISOCKET - $fs = "udp:" + $avp(forceIP) + ":5060"; # Reset force_socket again - #!endif + # Reset force_socket again + $fs = $avp(carrierSocketTransport) + ":" + $avp(carrierSocketIp) + ":" + $avp(carrierSocketPort); t_on_failure("MANAGE_FAILURE_GW"); t_on_branch("MANAGE_BRANCH_GW"); @@ -2074,6 +2090,10 @@ failure_route[MANAGE_FAILURE_AS] { if($dlg_var(distributeMethod) != 'static' && ds_next_dst()) { xinfo("[$dlg_var(cidhash)] MANAGE-FAILURE-AS: going to <$ru> via <$du>\n"); + + # Reset force_socket again + $fs = "udp:" + $var(trunksAddress) + ":5060"; + t_on_failure("MANAGE_FAILURE_AS"); route(RELAY); exit; @@ -2161,11 +2181,10 @@ event_route[tm:local-request] { route(GET_INFO_FROM_GATEWAY); remove_hf('X-Info-Gateway'); - #!ifdef WITH_MULTISOCKET - $fs = "udp:" + $avp(localSocket) + ":5060"; # force_socket for OPTIONS - #!endif + # force_socket for OPTIONS + route(FORCE_CARRIER_SOCKET); - xinfo("Ping inactive carrier server $avp(carrierServer) (carrier: $avp(carrier)) from $avp(localSocket)"); + xinfo("Ping inactive carrier server $avp(carrierServer) (carrier: $avp(carrier)) from $avp(carrierSocketIp)"); t_on_reply("LCR_PING"); } @@ -2236,8 +2255,10 @@ route[RTPENGINE] { route(QUALITYLABELS); - xinfo("[$dlg_var(cidhash)] RTPENGINE: rtpengine_manage [$var(rtpengine_opts) $var(callid) $var(label)]\n"); - rtpengine_manage("$var(rtpengine_opts) $var(callid) $var(label)"); + route(RTPENGINE_INTERFACES); + + xinfo("[$dlg_var(cidhash)] RTPENGINE: rtpengine_manage [$var(rtpengine_opts) $var(callid) $var(label) $var(interfaces)]\n"); + rtpengine_manage("$var(rtpengine_opts) $var(callid) $var(label) $var(interfaces)"); if (is_request() && is_method("BYE")) { route(QUALITY); @@ -2246,6 +2267,22 @@ route[RTPENGINE] { route(RECORD); } +route[RTPENGINE_INTERFACES] { + $var(interfaces) = ""; + + if (!has_body("application/sdp")) return; + if ($dlg_var(firstRtpengineOfferDone) == 'yes') return; + + # first SDP of the initial INVITE transaction, rtpengine_offer() will be called (direction= is only needed in first rtpengine_offer) + $dlg_var(firstRtpengineOfferDone) = 'yes'; + + if ($var(is_from_inside)) { + $var(interfaces) = "direction=" + $var(trunksAddress) + " direction=" + $dlg_var(externalSocket); + } else { + $var(interfaces) = "direction=" + $dlg_var(externalSocket) + " direction=" + $var(trunksAddress); + } +} + route[RTPENGINE_UNKNOWN_BYE] { $var(callid) = "call-id=trunks-outbound-" + $ci; rtpengine_delete("$var(callid)"); @@ -2365,6 +2402,23 @@ route[IS_WITHIN_COUNTRY] { sql_result_free("ra"); } +route[FORCE_CARRIER_SOCKET] { + if ($var(carrierSocketTransport) == '2') { + $avp(carrierSocketTransport) = 'tcp'; + $avp(carrierSocketPort) = '5060'; + } else if ($var(carrierSocketTransport) == '3') { + $avp(carrierSocketTransport) = 'tls'; + $avp(carrierSocketPort) = '5061'; + } else { + $avp(carrierSocketTransport) = 'udp'; + $avp(carrierSocketPort) = '5060'; + } + + $fs = $avp(carrierSocketTransport) + ":" + $avp(carrierSocketIp) + ":" + $avp(carrierSocketPort); + + return; +} + ################################################# # --- Kamailio-CGRateS related route blocks --- # ################################################# @@ -2599,18 +2653,13 @@ event_route[htable:mod-init] { abort(); } - #!ifdef WITH_MULTISOCKET - xnotice("Multi-socket ENABLED"); - if (dns_query("trunks.ivozprovider.local", "kamtrunks")) { - $var(trunksAddress) = $dns(kamtrunks=>addr); - xnotice("trunks.ivozprovider.local: $var(trunksAddress)\n"); - } else { - xerr("Problems resolving trunks.ivozprovider.local, aborting\n"); - abort(); - } - #!else - xnotice("Multi-socket NOT ENABLED"); - #!endif + if (dns_query("trunks.ivozprovider.local", "kamtrunks")) { + $var(trunksAddress) = $dns(kamtrunks=>addr); + xnotice("trunks.ivozprovider.local: $var(trunksAddress)\n"); + } else { + xerr("Problems resolving trunks.ivozprovider.local, aborting\n"); + abort(); + } #!ifdef WITHOUT_BOUNCER xnotice("External call bouncing NOT ENABLED"); diff --git a/kamailio/users/config/kamailio.cfg b/kamailio/users/config/kamailio.cfg index e2eed1fb8a5..9d52a34879a 100644 --- a/kamailio/users/config/kamailio.cfg +++ b/kamailio/users/config/kamailio.cfg @@ -51,8 +51,8 @@ # Marked for branches involving wss #!define FLB_WEBSOCKETS 8 -# Marked for branches calling to UAC using non-main address -#!define FLB_EXTRASOCKET 9 +# Marked for branches with first SDP already mangled by rtpengine +#!define FLB_INTERFACES_SET 9 # - options #!define WITH_ANTIFLOOD @@ -94,8 +94,6 @@ include_file "listeners.cfg" tcp_accept_no_cl=yes # Needed for WS -import_file "multisocket.cfg" - # -- Debug level # L_ALERT - log level -5 # L_BUG - log level -4 @@ -147,8 +145,8 @@ log_facility=LOG_LOCAL0 onsend_route_reply=yes # Add custom Server header -server_header="Server: Irontec IvozProvider v3.4" -user_agent_header="User-Agent: Irontec IvozProvider v3.4" +server_header="Server: Irontec IvozProvider v4.0" +user_agent_header="User-Agent: Irontec IvozProvider v4.0" ####### Modules Section ######## @@ -330,11 +328,11 @@ modparam("acc", "cdr_enable", 1) modparam("acc", "cdr_skip", "nocdr") modparam("acc", "cdr_extra_nullable", 1) modparam("acc", "cdr_log_enable", 1) -modparam("acc", "cdr_on_failed", 0) +modparam("acc", "cdr_on_failed", 1) modparam("acc", "cdr_expired_dlg_enable", 1) modparam("acc", "cdr_start_on_confirmed", 1) modparam("acc", "cdr_facility", "LOG_LOCAL3") -modparam("acc", "cdr_extra", "brandId=$dlg_var(brandId);companyId=$dlg_var(companyId);caller=$dlg_var(caller);callee=$dlg_var(callee);callid=$dlg_var(callid);callidHash=$dlg_var(cidhash);xcallid=$dlg_var(xcallid);diversion=$dlg_var(diversion);referrer=$dlg_var(referrer);referee=$dlg_var(referee);direction=$dlg_var(direction);userId=$dlg_var(userId);friendId=$dlg_var(friendId)") +modparam("acc", "cdr_extra", "brandId=$dlg_var(brandId);companyId=$dlg_var(companyId);caller=$dlg_var(caller);callee=$dlg_var(callee);callid=$dlg_var(callid);callidHash=$dlg_var(cidhash);xcallid=$dlg_var(xcallid);diversion=$dlg_var(diversion);referrer=$dlg_var(referrer);referee=$dlg_var(referee);direction=$dlg_var(direction);userId=$dlg_var(userId);friendId=$dlg_var(friendId);responseCode=$dlg_var(responseCode)") # DIALOG modparam("dialog", "dlg_flag", DLG_FLAG) @@ -438,6 +436,9 @@ request_route { if (t_check_trans()) { setflag(FLT_ACC); # do accounting setflag(FLT_ACCFAILED); # even if the transaction fails + if (is_present_hf("Reason") && $hdr(Reason) == 'SIP;cause=200;text="Call completed elsewhere"') { + $dlg_var(nocdr) = "1"; + } route(RTPENGINE); route(RELAY); } @@ -974,7 +975,11 @@ route[ADAPT_DIVERSION] { } } remove_hf_value("Diversion[0]"); - add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $(di{uri.host})); + if ($(di{uri.host}{s.len}) > 0) { + add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $(di{uri.host})); + } else { + add_diversion("$avp(reason)", 'sip:' + $var(transformated) + '@' + $fd); + } $dlg_var(diversion) = $var(transformated); } @@ -2117,11 +2122,10 @@ route[REGISTER] { # Store in kam_users_location_attrs used transport to retrieve it in lookup $xavp(ulattrs=>transport) = $proto; - #!ifdef WITH_MULTISOCKET - if ($Ri != $sel(cfg_get.address.main)) { + # Store external socket if different from main users address + if ($Ri != $var(usersAddress)) { $xavp(ulattrs[0]=>extrasocket) = $Ri; } - #!endif if (is_present_hf("Contact")) { $var(contact_uri) = @contact.uri; @@ -2769,11 +2773,9 @@ branch_route[MANAGE_BRANCH] { route(TRANSPORT_DETECT); - #!ifdef WITH_MULTISOCKET if (is_request() && !has_totag() && is_method("INVITE")) { - route(SOCKET_DETECT); + route(FORCE_MAIN_SOCKET); } - #!endif route(NATMANAGE); route(RTPENGINE); @@ -2781,16 +2783,16 @@ branch_route[MANAGE_BRANCH] { # Executed when dialog is confirmed with 2XX response code event_route[dialog:start] { + $dlg_var(responseCode) = '200'; + if(isbflagset(FLB_WEBSOCKETS)) { xnotice("[$dlg_var(cidhash)] Dialog involving WSS started\n"); $dlg_var(ws) = 'yes'; } - #!ifdef WITH_MULTISOCKET - if(isbflagset(FLB_EXTRASOCKET)) { - $dlg_var(extra_socket) = $Ri; + if ($xavp(ulattrs[$T_branch_idx]=>extrasocket) != $null) { + $dlg_var(externalSocket) = $xavp(ulattrs[$T_branch_idx]=>extrasocket); } - #!endif #!ifdef WITH_REALTIME $var(rtEvent) = "Confirmed"; @@ -2833,6 +2835,12 @@ event_route[dialog:end] { # Executed when dialog is not established event_route[dialog:failed] { + if ($rs == $null) { + $dlg_var(responseCode) = '500'; # Default response code for internal errors + } else { + $dlg_var(responseCode) = $rs; + } + sht_rm_name_re("dialogs=>$ci::.*"); #!ifdef WITH_REALTIME @@ -2856,25 +2864,13 @@ route[TRANSPORT_DETECT] { } } -#!ifdef WITH_MULTISOCKET -route[SOCKET_DETECT] { - $var(extra_socket) = 0; - if ($var(is_from_inside)) { - # To UAC - if ($xavp(ulattrs[$T_branch_idx]=>extrasocket) != $null) { - setbflag(FLB_EXTRASOCKET); - $var(extra_socket) = $xavp(ulattrs[$T_branch_idx]=>extrasocket); - } - } else { - # From UAC - if ($Ri != $sel(cfg_get.address.main)) { - # force_send_socket to main address (UAC talking to non-main address) - $fs = "udp:" + $sel(cfg_get.address.main) + ":5060"; - $dlg_var(extra_socket) = $Ri; - } +route[FORCE_MAIN_SOCKET] { + if (!$var(is_from_inside) && $Ri != $var(usersAddress)) { + # UAC talking to non-main address, force_send_socket to main address + $fs = "udp:" + $var(usersAddress) + ":5060"; + $dlg_var(externalSocket) = $Ri; } } -#!endif route[GET_CODEC_INFO] { $dlg_var(codecs) = ""; @@ -2936,19 +2932,7 @@ route[RTPENGINE] { $var(bridging) ='ICE=remove RTP/AVP'; } - $var(interfaces) = ""; - #!ifdef WITH_MULTISOCKET - $var(interfaces) = "direction=" + $sel(cfg_get.address.main) + " direction=" + $sel(cfg_get.address.main); - - if ($var(is_from_inside) && $dlg_var(extra_socket) != $null) { - $var(interfaces) = "direction=" + $sel(cfg_get.address.main) + " direction=" + $dlg_var(extra_socket); - } - - if ($var(is_from_inside) && $var(extra_socket) != 0) { - $var(interfaces) = "direction=" + $sel(cfg_get.address.main) + " direction=" + $var(extra_socket); - $var(extra_socket) = 0; # Avoid unwanted re-usages - } - #!endif + route(RTPENGINE_INTERFACES); $var(callid) = "call-id=users-" + $dlg_var(direction) + '-' + $dlg_var(callid); @@ -2973,6 +2957,29 @@ route[RTPENGINE] { } } +route[RTPENGINE_INTERFACES] { + $var(interfaces) = ""; + + if (!has_body("application/sdp")) return; + if ($dlg_var(responseCode) == '200') return; + if (isbflagset(FLB_INTERFACES_SET)) return; + + setbflag(FLB_INTERFACES_SET); # direction= is only needed in first SDP of an INVITE dialog + + # Direction must be set only in first SDP (initial INVITE with SDP or first response with SDP to initial INVITE with no SDP) + if ($var(is_from_inside)) { + if ($dlg_var(externalSocket) != $null) { + $var(interfaces) = "direction=" + $var(usersAddress) + " direction=" + $dlg_var(externalSocket); + } else if ($xavp(ulattrs[$T_branch_idx]=>extrasocket) != $null) { + $var(interfaces) = "direction=" + $var(usersAddress) + " direction=" + $xavp(ulattrs[$T_branch_idx]=>extrasocket); + } else { + $var(interfaces) = "direction=" + $var(usersAddress) + " direction=" + $var(usersAddress); + } + } else { + $var(interfaces) = "direction=" + $Ri + " direction=" + $var(usersAddress); + } +} + route[RTPENGINE_UNKNOWN_BYE] { # Totally best effort (only works for mediaRelaySetId 0, default value) $var(callid) = "call-id=users-outbound-" + $ci; @@ -3117,6 +3124,14 @@ event_route[htable:mod-init] { abort(); } + if (dns_query("users.ivozprovider.local", "kamusers")) { + $var(usersAddress) = $dns(kamusers=>addr); + xnotice("users.ivozprovider.local: $var(usersAddress)\n"); + } else { + xerr("Problems resolving users.ivozprovider.local, aborting\n"); + abort(); + } + #!ifdef WITH_PUSHSERVERS route(PUSHSERVERS_TIMER); #!endif diff --git a/kamailio/users/config/multisocket.cfg.in b/kamailio/users/config/multisocket.cfg.in deleted file mode 100644 index 6277916f7fa..00000000000 --- a/kamailio/users/config/multisocket.cfg.in +++ /dev/null @@ -1,47 +0,0 @@ -# This file enables having additional IP addresses (apart from the main one) -# -# - KamUsers will talk to registered UACs using the same socket they used in the -# register process. -# -# - For non-registered UACs (direct-connectivity), main address will be used. -# -# - KamUsers will always talk to KamTrunks/AS using main address. -# -# KAMUSERS CONFIGURATION -# -# - Set A.B.C.D to KamUsers main address (the address pointed by users.ivozprovider.local) -# - Set E.F.G.H to additional IP address -# - Add a similar block for every additional address -# - Rename this file to multisocket.cfg -# - Restart KamUsers with 'systemctl restart kamailio@users' -# - Configure rtpengine accordingly (read below) -# -# RTPENGINE CONFIGURATION -# -# - rtpengine process must have one --interface named A.B.C.D and another one -# named E.F.G.H (using appropiate addresses W.X.Y.Z and S.T.U.V): -# -# * W.X.Y.Z is the RTP address when A.B.C.D is the signalling adddress -# * S.T.U.V is the RTP address when E.F.G.H is the signalling adddress -# -# - To get that, edit /etc/rtpengine/rtpengine.conf (and restart rtpengine): -# -# * Set interface to: -# interface = A.B.C.D/W.X.Y.Z;E.F.G.H/S.T.U.V -# -# e.g. you must end up with 2 --interface in running proccess -# (--interface=A.B.C.D/W.X.Y.Z --interface=E.F.G.H/S.T.U.V) -# -# - In standalone installations A.B.C.D==W.X.Y.Z and E.F.G.H==S.T.U.V - -#!define WITH_MULTISOCKET - -# Main address (pointed by users.ivozprovider.local) -address.main = "A.B.C.D" desc "KamUsers main address" - -# Additional addresses (one line per additional address and protocol) -listen=udp:E.F.G.H:SIP_PORT -listen=tcp:E.F.G.H:SIP_PORT -listen=tls:E.F.G.H:SIPS_PORT -listen=tcp:E.F.G.H:WS_PORT -listen=tls:E.F.G.H:WSS_PORT diff --git a/library/DataFixtures/ORM/ProviderAdministrator.php b/library/DataFixtures/ORM/ProviderAdministrator.php index 2f0ce13294a..7679509c257 100644 --- a/library/DataFixtures/ORM/ProviderAdministrator.php +++ b/library/DataFixtures/ORM/ProviderAdministrator.php @@ -114,6 +114,7 @@ public function load(ObjectManager $manager) $this->setName("RestrictedAdmin"); $this->setLastname("Lastname"); $this->setBrand($fixture->getReference('_reference_ProviderBrand1')); + $this->setTimezone($fixture->getReference('_reference_ProviderTimezone145')); })->call($item6); $this->addReference('_reference_ProviderAdministrator6', $item6); diff --git a/library/DataFixtures/ORM/ProviderBrand.php b/library/DataFixtures/ORM/ProviderBrand.php index 28fe1dd724a..1967aa3590a 100644 --- a/library/DataFixtures/ORM/ProviderBrand.php +++ b/library/DataFixtures/ORM/ProviderBrand.php @@ -36,6 +36,7 @@ public function load(ObjectManager $manager) $this->setLanguage($fixture->getReference('_reference_ProviderLanguage1')); $this->setDefaultTimezone($fixture->getReference('_reference_ProviderTimezone145')); $this->setCurrency($fixture->getReference('_reference_ProviderCurrency1')); + $this->relFeatures = new \Doctrine\Common\Collections\ArrayCollection([]); })->call($item1); $this->addReference('_reference_ProviderBrand1', $item1); @@ -54,6 +55,7 @@ public function load(ObjectManager $manager) $this->setLanguage($fixture->getReference('_reference_ProviderLanguage1')); $this->setDefaultTimezone($fixture->getReference('_reference_ProviderTimezone145')); $this->setCurrency($fixture->getReference('_reference_ProviderCurrency2')); + $this->relFeatures = new \Doctrine\Common\Collections\ArrayCollection([]); })->call($item2); $this->addReference('_reference_ProviderBrand2', $item2); diff --git a/library/DataFixtures/ORM/ProviderCompany.php b/library/DataFixtures/ORM/ProviderCompany.php index 9fdbdb8a215..790049d7a33 100644 --- a/library/DataFixtures/ORM/ProviderCompany.php +++ b/library/DataFixtures/ORM/ProviderCompany.php @@ -62,6 +62,7 @@ public function load(ObjectManager $manager) $this->setCountry($fixture->getReference('_reference_ProviderCountry70')); $this->setTransformationRuleSet($fixture->getReference('_reference_ProviderTransformationRuleSet70')); $this->setVoicemailNotificationTemplate($fixture->getReference('_reference_ProviderNotificationTemplate1')); + $this->setAccessCredentialNotificationTemplate($fixture->getReference('_reference_ProviderNotificationTemplate5')); $this->setCorporation($fixture->getReference('_reference_Corporation1')); })->call($item1); diff --git a/library/DataFixtures/ORM/ProviderNotificationTemplate.php b/library/DataFixtures/ORM/ProviderNotificationTemplate.php index e3a6e21b4fa..fc6fb787b07 100644 --- a/library/DataFixtures/ORM/ProviderNotificationTemplate.php +++ b/library/DataFixtures/ORM/ProviderNotificationTemplate.php @@ -72,6 +72,20 @@ public function load(ObjectManager $manager) $this->sanitizeEntityValues($item4); $manager->persist($item4); + /** @var NotificationTemplateInterface $item4 */ + $item5 = $this->createEntityInstance(NotificationTemplate::class); + (function () use ($fixture) { + $this->setName("Access Credentials"); + $this->setType( + NotificationTemplateInterface::TYPE_ACCESSCREDENTIALS + ); + })->call($item5); + + + $this->addReference('_reference_ProviderNotificationTemplate5', $item5); + $this->sanitizeEntityValues($item5); + $manager->persist($item5); + $manager->flush(); } diff --git a/library/DataFixtures/ORM/ProviderProxyTrunk.php b/library/DataFixtures/ORM/ProviderProxyTrunk.php index 165a0119600..a30a1fc886a 100644 --- a/library/DataFixtures/ORM/ProviderProxyTrunk.php +++ b/library/DataFixtures/ORM/ProviderProxyTrunk.php @@ -24,6 +24,7 @@ public function load(ObjectManager $manager) (function () use ($fixture) { $this->setName("proxytrunks"); $this->setIp("127.0.0.1"); + $this->setAdvertisedIp("138.0.0.1"); })->call($item1); $this->addReference('_reference_ProviderProxyTrunk1', $item1); @@ -34,6 +35,7 @@ public function load(ObjectManager $manager) (function () use ($fixture) { $this->setName("ExtraIP"); $this->setIp("127.0.0.3"); + $this->setAdvertisedIp("138.0.0.3"); })->call($item2); $this->addReference('_reference_ProviderProxyTrunk2', $item2); @@ -44,6 +46,7 @@ public function load(ObjectManager $manager) (function () use ($fixture) { $this->setName("ip_for_delete_process"); $this->setIp("10.50.23.146"); + $this->setAdvertisedIp(null); })->call($item3); $this->addReference('_reference_ProviderProxyTrunk3', $item3); diff --git a/library/DataFixtures/ORM/ProviderProxyUser.php b/library/DataFixtures/ORM/ProviderProxyUser.php index c639224d1f3..45c9cfb9b6c 100644 --- a/library/DataFixtures/ORM/ProviderProxyUser.php +++ b/library/DataFixtures/ORM/ProviderProxyUser.php @@ -24,12 +24,23 @@ public function load(ObjectManager $manager) (function () use ($fixture) { $this->setName("proxyusers"); $this->setIp("127.0.0.1"); + $this->setAdvertisedIp("138.0.0.1"); })->call($item1); $this->addReference('_reference_ProviderProxyUserProxyUser1', $item1); $this->sanitizeEntityValues($item1); $manager->persist($item1); + $item2 = $this->createEntityInstance(ProxyUser::class); + (function () use ($fixture) { + $this->setName("another pu"); + $this->setIp("127.0.1.2"); + $this->setAdvertisedIp("138.0.1.2"); + })->call($item2); + + $this->addReference('_reference_ProviderProxyUserProxyUser2', $item2); + $this->sanitizeEntityValues($item2); + $manager->persist($item2); $manager->flush(); } diff --git a/library/DataFixtures/ORM/ProviderUsersCdr.php b/library/DataFixtures/ORM/ProviderUsersCdr.php new file mode 100644 index 00000000000..9bcb5fe43fc --- /dev/null +++ b/library/DataFixtures/ORM/ProviderUsersCdr.php @@ -0,0 +1,52 @@ +disableLifecycleEvents($manager); + $manager + ->getClassMetadata(UsersCdr::class) + ->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + + $entities = $this->usersCdrStub->getAll(); + foreach ($entities as $entity) { + $this->addReference( + '_reference_UsersCdr' . $entity->getId(), + $entity + ); + $manager->persist($entity); + } + + $manager->flush(); + } + + public function getDependencies() + { + return array( + ProviderBrand::class, + ProviderCompany::class, + ProviderExtension::class, + ProviderUser::class, + ); + } +} diff --git a/library/DataFixtures/Stub/Provider/UsersCdrStub.php b/library/DataFixtures/Stub/Provider/UsersCdrStub.php new file mode 100644 index 00000000000..1c342d4a917 --- /dev/null +++ b/library/DataFixtures/Stub/Provider/UsersCdrStub.php @@ -0,0 +1,66 @@ +setStartTime(new \DateTime('2018-11-22 16:54:49')) + ->setDuration(3600) + ->setDirection('outbound') + ->setCaller('102') + ->setCallee('+34676896561') + ->setCallid('9297bdde-309cd48f@10.10.1.123') + ->setBrandId(1) + ->setCompanyId(1) + ->setExtensionId(1) + ->setUserId(1); + + $this->append($dto); + + $dto = (new UsersCdrDto(2)) + ->setStartTime(new \DateTime('2018-11-22 16:54:49')) + ->setDuration(3600) + ->setDirection('outbound') + ->setCaller('102') + ->setCallee('+34676896561') + ->setCallid('9297bdde-309cd48f@10.10.1.124') + ->setBrandId(1) + ->setCompanyId(1) + ->setUserId(1) + ->setKamUsersCdrId(2); + + $this->append($dto); + + $dto = new UsersCdrDto(3); + $prevMonth = strtotime('-1 week'); + $dateTime = date('Y-m-d H:i:s', $prevMonth); + + $dto + ->setStartTime($dateTime) + ->setDuration(3600) + ->setDirection('outbound') + ->setCaller('103') + ->setCallee('+34676896564') + ->setCallid('8297bdde-309cd49f@10.10.1.125') + ->setBrandId(1) + ->setCompanyId(1) + ->setUserId(1) + ->setKamUsersCdrId(3); + + $this->append($dto); + } +} diff --git a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointAbstract.php b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointAbstract.php index d32254571ad..2a09c8a285c 100644 --- a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointAbstract.php @@ -244,7 +244,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): PsEndpointDto + /** + * @param int | null $id + */ + public static function createDto($id = null): PsEndpointDto { return new PsEndpointDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointDtoAbstract.php index 9bdb748992e..47fd7ab2379 100644 --- a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointDtoAbstract.php @@ -162,10 +162,7 @@ abstract class PsEndpointDtoAbstract implements DataTransferObjectInterface */ private $retailAccount = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -551,6 +548,9 @@ public function getRtpTimeoutHold(): ?int return $this->rtpTimeoutHold; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -575,7 +575,7 @@ public function getTerminal(): ?TerminalDto return $this->terminal; } - public function setTerminalId($id): static + public function setTerminalId(?int $id): static { $value = !is_null($id) ? new TerminalDto($id) @@ -605,7 +605,7 @@ public function getFriend(): ?FriendDto return $this->friend; } - public function setFriendId($id): static + public function setFriendId(?int $id): static { $value = !is_null($id) ? new FriendDto($id) @@ -635,7 +635,7 @@ public function getResidentialDevice(): ?ResidentialDeviceDto return $this->residentialDevice; } - public function setResidentialDeviceId($id): static + public function setResidentialDeviceId(?int $id): static { $value = !is_null($id) ? new ResidentialDeviceDto($id) @@ -665,7 +665,7 @@ public function getRetailAccount(): ?RetailAccountDto return $this->retailAccount; } - public function setRetailAccountId($id): static + public function setRetailAccountId(?int $id): static { $value = !is_null($id) ? new RetailAccountDto($id) diff --git a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointInterface.php b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointInterface.php index cf1bd4bc75a..0a96db6f0c0 100644 --- a/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointInterface.php +++ b/library/Ivoz/Ast/Domain/Model/PsEndpoint/PsEndpointInterface.php @@ -71,7 +71,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): PsEndpointDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): PsEndpointDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyAbstract.php b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyAbstract.php index cc79f3bf955..8be1fd4c537 100644 --- a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyAbstract.php @@ -107,7 +107,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): PsIdentifyDto + /** + * @param int | null $id + */ + public static function createDto($id = null): PsIdentifyDto { return new PsIdentifyDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyDtoAbstract.php index b0c228d9b5c..a2316054f0b 100644 --- a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyDtoAbstract.php @@ -67,10 +67,7 @@ abstract class PsIdentifyDtoAbstract implements DataTransferObjectInterface */ private $retailAccount = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -190,6 +187,9 @@ public function getSrvLookups(): ?string return $this->srvLookups; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -214,7 +214,7 @@ public function getTerminal(): ?TerminalDto return $this->terminal; } - public function setTerminalId($id): static + public function setTerminalId(?int $id): static { $value = !is_null($id) ? new TerminalDto($id) @@ -244,7 +244,7 @@ public function getFriend(): ?FriendDto return $this->friend; } - public function setFriendId($id): static + public function setFriendId(?int $id): static { $value = !is_null($id) ? new FriendDto($id) @@ -274,7 +274,7 @@ public function getResidentialDevice(): ?ResidentialDeviceDto return $this->residentialDevice; } - public function setResidentialDeviceId($id): static + public function setResidentialDeviceId(?int $id): static { $value = !is_null($id) ? new ResidentialDeviceDto($id) @@ -304,7 +304,7 @@ public function getRetailAccount(): ?RetailAccountDto return $this->retailAccount; } - public function setRetailAccountId($id): static + public function setRetailAccountId(?int $id): static { $value = !is_null($id) ? new RetailAccountDto($id) diff --git a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyInterface.php b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyInterface.php index b1c47ad7b27..99aa5488376 100644 --- a/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyInterface.php +++ b/library/Ivoz/Ast/Domain/Model/PsIdentify/PsIdentifyInterface.php @@ -31,7 +31,10 @@ public function getId(): ?int; public function setMatchHeader(?string $matchHeader = null): static; - public static function createDto(string|int|null $id = null): PsIdentifyDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): PsIdentifyDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Ast/Domain/Model/Queue/QueueAbstract.php b/library/Ivoz/Ast/Domain/Model/Queue/QueueAbstract.php index 08bf060bd05..9b9bc116296 100644 --- a/library/Ivoz/Ast/Domain/Model/Queue/QueueAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/Queue/QueueAbstract.php @@ -122,7 +122,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): QueueDto + /** + * @param int | null $id + */ + public static function createDto($id = null): QueueDto { return new QueueDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/Queue/QueueDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/Queue/QueueDtoAbstract.php index 98a14f212e3..1e16acb4a00 100644 --- a/library/Ivoz/Ast/Domain/Model/Queue/QueueDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/Queue/QueueDtoAbstract.php @@ -84,10 +84,7 @@ abstract class QueueDtoAbstract implements DataTransferObjectInterface */ private $queue = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -299,6 +296,9 @@ public function getWeight(): ?int return $this->weight; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -323,7 +323,7 @@ public function getQueue(): ?QueueDto return $this->queue; } - public function setQueueId($id): static + public function setQueueId(?int $id): static { $value = !is_null($id) ? new QueueDto($id) diff --git a/library/Ivoz/Ast/Domain/Model/Queue/QueueInterface.php b/library/Ivoz/Ast/Domain/Model/Queue/QueueInterface.php index 86edd07b931..15a8a7a28b1 100644 --- a/library/Ivoz/Ast/Domain/Model/Queue/QueueInterface.php +++ b/library/Ivoz/Ast/Domain/Model/Queue/QueueInterface.php @@ -51,7 +51,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): QueueDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): QueueDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMember.php b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMember.php index bebfbe91b72..b1d7ceec912 100644 --- a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMember.php +++ b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMember.php @@ -22,7 +22,7 @@ public function getChangeSet(): array * Get id * @codeCoverageIgnore */ - public function getId(): null|string|int + public function getId(): null|int { return $this->id; } diff --git a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberAbstract.php b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberAbstract.php index 7dce7ea42f0..55e0560cf83 100644 --- a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberAbstract.php @@ -100,7 +100,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): QueueMemberDto + /** + * @param int | null $id + */ + public static function createDto($id = null): QueueMemberDto { return new QueueMemberDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberDtoAbstract.php index 7e1492eba13..b66c629e3b1 100644 --- a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberDtoAbstract.php @@ -59,10 +59,7 @@ abstract class QueueMemberDtoAbstract implements DataTransferObjectInterface */ private $queueMember = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -204,6 +201,9 @@ public function getPaused(): ?int return $this->paused; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -228,7 +228,7 @@ public function getQueueMember(): ?QueueMemberDto return $this->queueMember; } - public function setQueueMemberId($id): static + public function setQueueMemberId(?int $id): static { $value = !is_null($id) ? new QueueMemberDto($id) diff --git a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberInterface.php b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberInterface.php index 137dda7613e..b9eff4c5883 100644 --- a/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberInterface.php +++ b/library/Ivoz/Ast/Domain/Model/QueueMember/QueueMemberInterface.php @@ -22,9 +22,12 @@ public function getChangeSet(): array; * Get id * @codeCoverageIgnore */ - public function getId(): string|int|null; + public function getId(): ?int; - public static function createDto(string|int|null $id = null): QueueMemberDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): QueueMemberDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailAbstract.php b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailAbstract.php index 4ac6954a7b8..5fe2a3a284c 100644 --- a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailAbstract.php @@ -231,7 +231,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): VoicemailDto + /** + * @param int | null $id + */ + public static function createDto($id = null): VoicemailDto { return new VoicemailDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailDtoAbstract.php index 9c82dd02764..d726a09c908 100644 --- a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailDtoAbstract.php @@ -189,10 +189,7 @@ abstract class VoicemailDtoAbstract implements DataTransferObjectInterface */ private $voicemail = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -698,6 +695,9 @@ public function getStamp(): \DateTimeInterface|string|null return $this->stamp; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -722,7 +722,7 @@ public function getVoicemail(): ?VoicemailDto return $this->voicemail; } - public function setVoicemailId($id): static + public function setVoicemailId(?int $id): static { $value = !is_null($id) ? new VoicemailDto($id) diff --git a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailInterface.php b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailInterface.php index deb6051d5d2..511bd798bd1 100644 --- a/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailInterface.php +++ b/library/Ivoz/Ast/Domain/Model/Voicemail/VoicemailInterface.php @@ -61,7 +61,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): VoicemailDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): VoicemailDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageAbstract.php b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageAbstract.php index 1d6a516a72e..3bb9594810e 100644 --- a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageAbstract.php @@ -128,7 +128,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): VoicemailMessageDto + /** + * @param int | null $id + */ + public static function createDto($id = null): VoicemailMessageDto { return new VoicemailMessageDto($id); } diff --git a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageDtoAbstract.php b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageDtoAbstract.php index 382c4652d78..8e4310fccdc 100644 --- a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageDtoAbstract.php +++ b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageDtoAbstract.php @@ -88,10 +88,7 @@ abstract class VoicemailMessageDtoAbstract implements DataTransferObjectInterfac */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -329,6 +326,9 @@ public function getParsed(): ?bool return $this->parsed; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageInterface.php b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageInterface.php index ea50a0b1df1..a71d1f91998 100644 --- a/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageInterface.php +++ b/library/Ivoz/Ast/Domain/Model/VoicemailMessage/VoicemailMessageInterface.php @@ -35,7 +35,10 @@ public function getMetadataFileBaseName(): string; public function getMetadataFileName(): string; - public static function createDto(string|int|null $id = null): VoicemailMessageDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): VoicemailMessageDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionAbstract.php index 1e99c71d615..33ee3b62097 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionAbstract.php @@ -121,7 +121,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpAccountActionDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpAccountActionDto { return new TpAccountActionDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionDtoAbstract.php index 8296ea0644c..f1eb05ea055 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionDtoAbstract.php @@ -75,10 +75,7 @@ abstract class TpAccountActionDtoAbstract implements DataTransferObjectInterface */ private $carrier = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -250,6 +247,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -274,7 +274,7 @@ public function getCompany(): ?CompanyDto return $this->company; } - public function setCompanyId($id): static + public function setCompanyId(?int $id): static { $value = !is_null($id) ? new CompanyDto($id) @@ -304,7 +304,7 @@ public function getCarrier(): ?CarrierDto return $this->carrier; } - public function setCarrierId($id): static + public function setCarrierId(?int $id): static { $value = !is_null($id) ? new CarrierDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionInterface.php b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionInterface.php index 9d4787b22c6..8c6f08919f0 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpAccountAction/TpAccountActionInterface.php @@ -27,7 +27,10 @@ public function getId(): ?int; */ public function getChangeSet(): array; - public static function createDto(string|int|null $id = null): TpAccountActionDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpAccountActionDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrAbstract.php index 33fceef35e6..e43c7afeb2b 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrAbstract.php @@ -212,7 +212,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpCdrDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpCdrDto { return new TpCdrDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrDtoAbstract.php index 3f13d829d5a..b234a3d2a04 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrDtoAbstract.php @@ -133,10 +133,7 @@ abstract class TpCdrDtoAbstract implements DataTransferObjectInterface */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -440,6 +437,9 @@ public function getCost(): ?float return $this->cost; } + /** + * @param array $costDetails + */ public function setCostDetails(array $costDetails): static { $this->costDetails = $costDetails; @@ -500,6 +500,9 @@ public function getDeletedAt(): \DateTimeInterface|string|null return $this->deletedAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrInterface.php b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrInterface.php index 775a7eea3a3..c3d0440713b 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdr/TpCdrInterface.php @@ -40,7 +40,10 @@ public function getRatingPlanTag(): string; */ public function getMatchedDestinationTag(): string; - public static function createDto(string|int|null $id = null): TpCdrDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpCdrDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatAbstract.php index 22cb05f310e..06ae8d23f7f 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatAbstract.php @@ -258,7 +258,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpCdrStatDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpCdrStatDto { return new TpCdrStatDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatDtoAbstract.php index cadf1292913..2c957b61dca 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatDtoAbstract.php @@ -159,10 +159,7 @@ abstract class TpCdrStatDtoAbstract implements DataTransferObjectInterface */ private $carrier = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -584,6 +581,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -608,7 +608,7 @@ public function getCarrier(): ?CarrierDto return $this->carrier; } - public function setCarrierId($id): static + public function setCarrierId(?int $id): static { $value = !is_null($id) ? new CarrierDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatInterface.php b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatInterface.php index 4a6a6f35a94..f87abc82620 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpCdrStat/TpCdrStatInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpCdrStatDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpCdrStatDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerAbstract.php index 6ef07b93079..981f9c89972 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerAbstract.php @@ -247,7 +247,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpDerivedChargerDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDerivedChargerDto { return new TpDerivedChargerDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerDtoAbstract.php index fc406da383e..84bb9c4ae77 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerDtoAbstract.php @@ -154,10 +154,7 @@ abstract class TpDerivedChargerDtoAbstract implements DataTransferObjectInterfac */ private $brand = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -565,6 +562,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -589,7 +589,7 @@ public function getBrand(): ?BrandDto return $this->brand; } - public function setBrandId($id): static + public function setBrandId(?int $id): static { $value = !is_null($id) ? new BrandDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerInterface.php b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerInterface.php index 11c3fb07089..83d91fccb2f 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDerivedCharger/TpDerivedChargerInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpDerivedChargerDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDerivedChargerDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationAbstract.php index 5fdd9afba56..791879f8afc 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationAbstract.php @@ -79,7 +79,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpDestinationDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDestinationDto { return new TpDestinationDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationDtoAbstract.php index 894df9598a1..671741a3863 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationDtoAbstract.php @@ -44,10 +44,7 @@ abstract class TpDestinationDtoAbstract implements DataTransferObjectInterface */ private $destination = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -147,6 +144,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -171,7 +171,7 @@ public function getDestination(): ?DestinationDto return $this->destination; } - public function setDestinationId($id): static + public function setDestinationId(?int $id): static { $value = !is_null($id) ? new DestinationDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationInterface.php b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationInterface.php index b986f751698..e70dc1339eb 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestination/TpDestinationInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpDestinationDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDestinationDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateAbstract.php index 70de92587ee..984ef73a895 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateAbstract.php @@ -117,7 +117,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpDestinationRateDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDestinationRateDto { return new TpDestinationRateDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateDtoAbstract.php index 46f1003a89c..6d29b845692 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateDtoAbstract.php @@ -69,10 +69,7 @@ abstract class TpDestinationRateDtoAbstract implements DataTransferObjectInterfa */ private $destinationRate = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -242,6 +239,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -266,7 +266,7 @@ public function getDestinationRate(): ?DestinationRateDto return $this->destinationRate; } - public function setDestinationRateId($id): static + public function setDestinationRateId(?int $id): static { $value = !is_null($id) ? new DestinationRateDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateInterface.php b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateInterface.php index 4c1d76fbdf3..a96b3500735 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpDestinationRate/TpDestinationRateInterface.php @@ -30,7 +30,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpDestinationRateDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpDestinationRateDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleAbstract.php index 3472fd3bf23..9d11b197310 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleAbstract.php @@ -142,7 +142,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpLcrRuleDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpLcrRuleDto { return new TpLcrRuleDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleDtoAbstract.php index efdb565c57b..6e33db9f8c3 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleDtoAbstract.php @@ -89,10 +89,7 @@ abstract class TpLcrRuleDtoAbstract implements DataTransferObjectInterface */ private $outgoingRouting = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -318,6 +315,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -342,7 +342,7 @@ public function getOutgoingRouting(): ?OutgoingRoutingDto return $this->outgoingRouting; } - public function setOutgoingRoutingId($id): static + public function setOutgoingRoutingId(?int $id): static { $value = !is_null($id) ? new OutgoingRoutingDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleInterface.php b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleInterface.php index ab910f51bd9..8e281771655 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpLcrRule/TpLcrRuleInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpLcrRuleDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpLcrRuleDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateAbstract.php index 6ef4e94f0ad..8ae7bbde084 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateAbstract.php @@ -112,7 +112,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpRateDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRateDto { return new TpRateDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateDtoAbstract.php index 2743e3718ec..9cb2e8ba4e1 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateDtoAbstract.php @@ -64,10 +64,7 @@ abstract class TpRateDtoAbstract implements DataTransferObjectInterface */ private $destinationRate = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -223,6 +220,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -247,7 +247,7 @@ public function getDestinationRate(): ?DestinationRateDto return $this->destinationRate; } - public function setDestinationRateId($id): static + public function setDestinationRateId(?int $id): static { $value = !is_null($id) ? new DestinationRateDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateInterface.php b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateInterface.php index efedd78a966..9a47a6b0001 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRate/TpRateInterface.php @@ -36,7 +36,10 @@ public function setRateIncrement(string $rateIncrement): static; */ public function setGroupIntervalStart(string $groupIntervalStart): static; - public static function createDto(string|int|null $id = null): TpRateDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRateDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanAbstract.php index ca6baed3764..311a950371e 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanAbstract.php @@ -93,7 +93,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpRatingPlanDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRatingPlanDto { return new TpRatingPlanDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanDtoAbstract.php index 0d6a20ec6a0..478e48bf541 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanDtoAbstract.php @@ -54,10 +54,7 @@ abstract class TpRatingPlanDtoAbstract implements DataTransferObjectInterface */ private $ratingPlan = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -185,6 +182,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -209,7 +209,7 @@ public function getRatingPlan(): ?RatingPlanDto return $this->ratingPlan; } - public function setRatingPlanId($id): static + public function setRatingPlanId(?int $id): static { $value = !is_null($id) ? new RatingPlanDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanInterface.php b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanInterface.php index f66000f7dd2..70674cb00c1 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingPlan/TpRatingPlanInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpRatingPlanDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRatingPlanDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileAbstract.php index 893de9e2945..c8b1134a61b 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileAbstract.php @@ -132,7 +132,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpRatingProfileDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRatingProfileDto { return new TpRatingProfileDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileDtoAbstract.php index 36ead7293a6..83010e1ee5c 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileDtoAbstract.php @@ -85,10 +85,7 @@ abstract class TpRatingProfileDtoAbstract implements DataTransferObjectInterface */ private $outgoingRoutingRelCarrier = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -288,6 +285,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -312,7 +312,7 @@ public function getRatingProfile(): ?RatingProfileDto return $this->ratingProfile; } - public function setRatingProfileId($id): static + public function setRatingProfileId(?int $id): static { $value = !is_null($id) ? new RatingProfileDto($id) @@ -342,7 +342,7 @@ public function getOutgoingRoutingRelCarrier(): ?OutgoingRoutingRelCarrierDto return $this->outgoingRoutingRelCarrier; } - public function setOutgoingRoutingRelCarrierId($id): static + public function setOutgoingRoutingRelCarrierId(?int $id): static { $value = !is_null($id) ? new OutgoingRoutingRelCarrierDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileInterface.php b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileInterface.php index 137e4aef833..0ba18b88a4f 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpRatingProfile/TpRatingProfileInterface.php @@ -27,7 +27,10 @@ public function getId(): ?int; */ public function getChangeSet(): array; - public static function createDto(string|int|null $id = null): TpRatingProfileDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpRatingProfileDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingAbstract.php index b5cba2a30e8..fc9a82a99ed 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingAbstract.php @@ -109,7 +109,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TpTimingDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TpTimingDto { return new TpTimingDto($id); } diff --git a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingDtoAbstract.php b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingDtoAbstract.php index 462a2dbee6a..927ea420b15 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingDtoAbstract.php +++ b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingDtoAbstract.php @@ -64,10 +64,7 @@ abstract class TpTimingDtoAbstract implements DataTransferObjectInterface */ private $ratingPlan = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -223,6 +220,9 @@ public function getCreatedAt(): \DateTimeInterface|string|null return $this->createdAt; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -247,7 +247,7 @@ public function getRatingPlan(): ?RatingPlanDto return $this->ratingPlan; } - public function setRatingPlanId($id): static + public function setRatingPlanId(?int $id): static { $value = !is_null($id) ? new RatingPlanDto($id) diff --git a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingInterface.php b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingInterface.php index d130d6b378b..34f2fd8267a 100644 --- a/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingInterface.php +++ b/library/Ivoz/Cgr/Domain/Model/TpTiming/TpTimingInterface.php @@ -19,7 +19,10 @@ interface TpTimingInterface extends EntityInterface */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TpTimingDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TpTimingDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherAbstract.php b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherAbstract.php index d761857ed55..7afcf192b3b 100644 --- a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherAbstract.php @@ -92,7 +92,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): DispatcherDto + /** + * @param int | null $id + */ + public static function createDto($id = null): DispatcherDto { return new DispatcherDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherDtoAbstract.php index c01167f970a..f2301ce3f18 100644 --- a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherDtoAbstract.php @@ -54,10 +54,7 @@ abstract class DispatcherDtoAbstract implements DataTransferObjectInterface */ private $applicationServer = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -185,6 +182,9 @@ public function getDescription(): ?string return $this->description; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -209,7 +209,7 @@ public function getApplicationServer(): ?ApplicationServerDto return $this->applicationServer; } - public function setApplicationServerId($id): static + public function setApplicationServerId(?int $id): static { $value = !is_null($id) ? new ApplicationServerDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherInterface.php b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherInterface.php index 2655fd7fbba..165df0f2f7e 100644 --- a/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherInterface.php +++ b/library/Ivoz/Kam/Domain/Model/Dispatcher/DispatcherInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): DispatcherDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): DispatcherDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineAbstract.php b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineAbstract.php index d7a64a304f7..c7e28f6e96f 100644 --- a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineAbstract.php @@ -91,7 +91,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): RtpengineDto + /** + * @param int | null $id + */ + public static function createDto($id = null): RtpengineDto { return new RtpengineDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineDtoAbstract.php index 50b66b7f512..bd4d705b24a 100644 --- a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineDtoAbstract.php @@ -54,10 +54,7 @@ abstract class RtpengineDtoAbstract implements DataTransferObjectInterface */ private $mediaRelaySet = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -185,6 +182,9 @@ public function getDescription(): ?string return $this->description; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -209,7 +209,7 @@ public function getMediaRelaySet(): ?MediaRelaySetDto return $this->mediaRelaySet; } - public function setMediaRelaySetId($id): static + public function setMediaRelaySetId(?int $id): static { $value = !is_null($id) ? new MediaRelaySetDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineInterface.php b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineInterface.php index 316d3d79f5e..7a482672cfe 100644 --- a/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineInterface.php +++ b/library/Ivoz/Kam/Domain/Model/Rtpengine/RtpengineInterface.php @@ -28,7 +28,10 @@ public function getChangeSet(): array; public function setMediaRelaySet(?MediaRelaySetInterface $mediaRelaySet = null): static; - public static function createDto(string|int|null $id = null): RtpengineDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): RtpengineDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressAbstract.php index 05c0919183d..976e6b1e5a7 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressAbstract.php @@ -83,7 +83,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksAddressDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksAddressDto { return new TrunksAddressDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressDtoAbstract.php index ebd2fb1fa1b..87acb8d70f2 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressDtoAbstract.php @@ -49,10 +49,7 @@ abstract class TrunksAddressDtoAbstract implements DataTransferObjectInterface */ private $ddiProviderAddress = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -166,6 +163,9 @@ public function getTag(): ?string return $this->tag; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -190,7 +190,7 @@ public function getDdiProviderAddress(): ?DdiProviderAddressDto return $this->ddiProviderAddress; } - public function setDdiProviderAddressId($id): static + public function setDdiProviderAddressId(?int $id): static { $value = !is_null($id) ? new DdiProviderAddressDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressInterface.php index ca3758a1b5d..a946f901561 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksAddress/TrunksAddressInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TrunksAddressDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksAddressDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrAbstract.php index a8aecda0894..03c84fd5102 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrAbstract.php @@ -195,7 +195,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksCdrDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksCdrDto { return new TrunksCdrDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrDtoAbstract.php index 33839920ae4..8ae6797022e 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrDtoAbstract.php @@ -148,10 +148,7 @@ abstract class TrunksCdrDtoAbstract implements DataTransferObjectInterface */ private $ddiProvider = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -409,6 +406,9 @@ public function getCgrid(): ?string return $this->cgrid; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -433,7 +433,7 @@ public function getBrand(): ?BrandDto return $this->brand; } - public function setBrandId($id): static + public function setBrandId(?int $id): static { $value = !is_null($id) ? new BrandDto($id) @@ -463,7 +463,7 @@ public function getCompany(): ?CompanyDto return $this->company; } - public function setCompanyId($id): static + public function setCompanyId(?int $id): static { $value = !is_null($id) ? new CompanyDto($id) @@ -493,7 +493,7 @@ public function getCarrier(): ?CarrierDto return $this->carrier; } - public function setCarrierId($id): static + public function setCarrierId(?int $id): static { $value = !is_null($id) ? new CarrierDto($id) @@ -523,7 +523,7 @@ public function getRetailAccount(): ?RetailAccountDto return $this->retailAccount; } - public function setRetailAccountId($id): static + public function setRetailAccountId(?int $id): static { $value = !is_null($id) ? new RetailAccountDto($id) @@ -553,7 +553,7 @@ public function getResidentialDevice(): ?ResidentialDeviceDto return $this->residentialDevice; } - public function setResidentialDeviceId($id): static + public function setResidentialDeviceId(?int $id): static { $value = !is_null($id) ? new ResidentialDeviceDto($id) @@ -583,7 +583,7 @@ public function getUser(): ?UserDto return $this->user; } - public function setUserId($id): static + public function setUserId(?int $id): static { $value = !is_null($id) ? new UserDto($id) @@ -613,7 +613,7 @@ public function getFriend(): ?FriendDto return $this->friend; } - public function setFriendId($id): static + public function setFriendId(?int $id): static { $value = !is_null($id) ? new FriendDto($id) @@ -643,7 +643,7 @@ public function getFax(): ?FaxDto return $this->fax; } - public function setFaxId($id): static + public function setFaxId(?int $id): static { $value = !is_null($id) ? new FaxDto($id) @@ -673,7 +673,7 @@ public function getDdi(): ?DdiDto return $this->ddi; } - public function setDdiId($id): static + public function setDdiId(?int $id): static { $value = !is_null($id) ? new DdiDto($id) @@ -703,7 +703,7 @@ public function getDdiProvider(): ?DdiProviderDto return $this->ddiProvider; } - public function setDdiProviderId($id): static + public function setDdiProviderId(?int $id): static { $value = !is_null($id) ? new DdiProviderDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrInterface.php index 4f9902519e9..dd1ff1655dc 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrInterface.php @@ -34,7 +34,10 @@ public function getId(): ?int; public function isOutboundCall(): bool; - public static function createDto(string|int|null $id = null): TrunksCdrDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksCdrDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrRepository.php b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrRepository.php index 41ffe8c7869..5ad02190fed 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrRepository.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksCdr/TrunksCdrRepository.php @@ -13,7 +13,7 @@ interface TrunksCdrRepository extends ObjectRepository, Selectable * * @param int $batchSize * @param array|null $order - * @return \Generator + * @return \Generator> */ public function getUnparsedCallsGeneratorWithoutOffset(int $batchSize, array $order = null); diff --git a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrAbstract.php index ae157108f8c..f5ce771fecb 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrAbstract.php @@ -80,7 +80,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksDomainAttrDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksDomainAttrDto { return new TrunksDomainAttrDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrDtoAbstract.php index da028ad9a3f..f018a471ecb 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrDtoAbstract.php @@ -43,10 +43,7 @@ abstract class TrunksDomainAttrDtoAbstract implements DataTransferObjectInterfac */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -158,6 +155,9 @@ public function getLastModified(): \DateTimeInterface|string|null return $this->lastModified; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrInterface.php index 474af00e0d2..96f862a9de7 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksDomainAttr/TrunksDomainAttrInterface.php @@ -18,7 +18,10 @@ interface TrunksDomainAttrInterface extends EntityInterface */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TrunksDomainAttrDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksDomainAttrDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableAbstract.php index 5aa3afa4748..702aac9679c 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableAbstract.php @@ -82,7 +82,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksHtableDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksHtableDto { return new TrunksHtableDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableDtoAbstract.php index 94dad5e01db..b2a6af136a5 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableDtoAbstract.php @@ -43,10 +43,7 @@ abstract class TrunksHtableDtoAbstract implements DataTransferObjectInterface */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -158,6 +155,9 @@ public function getExpires(): ?int return $this->expires; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableInterface.php index c06af422343..100c0dd93a6 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksHtable/TrunksHtableInterface.php @@ -18,7 +18,10 @@ interface TrunksHtableInterface extends EntityInterface */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TrunksHtableDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksHtableDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayAbstract.php index 844e7d884c5..cec58d9450f 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayAbstract.php @@ -118,7 +118,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksLcrGatewayDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrGatewayDto { return new TrunksLcrGatewayDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayDtoAbstract.php index 28147f7e1df..16f352a1d20 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayDtoAbstract.php @@ -84,10 +84,7 @@ abstract class TrunksLcrGatewayDtoAbstract implements DataTransferObjectInterfac */ private $carrierServer = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -299,6 +296,9 @@ public function getDefunct(): ?int return $this->defunct; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -323,7 +323,7 @@ public function getCarrierServer(): ?CarrierServerDto return $this->carrierServer; } - public function setCarrierServerId($id): static + public function setCarrierServerId(?int $id): static { $value = !is_null($id) ? new CarrierServerDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayInterface.php index e45918090a6..711fcc35e04 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrGateway/TrunksLcrGatewayInterface.php @@ -26,7 +26,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TrunksLcrGatewayDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrGatewayDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleAbstract.php index 8e5c8187b24..3602d7c4924 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleAbstract.php @@ -111,7 +111,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksLcrRuleDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrRuleDto { return new TrunksLcrRuleDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleDtoAbstract.php index 68d0fa284df..ae5f1eb1db6 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleDtoAbstract.php @@ -71,10 +71,7 @@ abstract class TrunksLcrRuleDtoAbstract implements DataTransferObjectInterface */ private $outgoingRouting = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -220,6 +217,9 @@ public function getEnabled(): ?int return $this->enabled; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -244,7 +244,7 @@ public function getRoutingPattern(): ?RoutingPatternDto return $this->routingPattern; } - public function setRoutingPatternId($id): static + public function setRoutingPatternId(?int $id): static { $value = !is_null($id) ? new RoutingPatternDto($id) @@ -274,7 +274,7 @@ public function getRoutingPatternGroupsRelPattern(): ?RoutingPatternGroupsRelPat return $this->routingPatternGroupsRelPattern; } - public function setRoutingPatternGroupsRelPatternId($id): static + public function setRoutingPatternGroupsRelPatternId(?int $id): static { $value = !is_null($id) ? new RoutingPatternGroupsRelPatternDto($id) @@ -304,7 +304,7 @@ public function getOutgoingRouting(): ?OutgoingRoutingDto return $this->outgoingRouting; } - public function setOutgoingRoutingId($id): static + public function setOutgoingRoutingId(?int $id): static { $value = !is_null($id) ? new OutgoingRoutingDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleInterface.php index 1255169f277..4a86a7d5f74 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRule/TrunksLcrRuleInterface.php @@ -36,7 +36,10 @@ public function getId(): ?int; */ public static function getFromUriForOutgoingRouting(OutgoingRoutingInterface $outgoingRouting): string; - public static function createDto(string|int|null $id = null): TrunksLcrRuleDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrRuleDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetAbstract.php index ce384004a01..2bf2e429df7 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetAbstract.php @@ -87,7 +87,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksLcrRuleTargetDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrRuleTargetDto { return new TrunksLcrRuleTargetDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetDtoAbstract.php index e0fe7f78238..06a533f3291 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetDtoAbstract.php @@ -51,10 +51,7 @@ abstract class TrunksLcrRuleTargetDtoAbstract implements DataTransferObjectInter */ private $outgoingRouting = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -144,6 +141,9 @@ public function getWeight(): ?int return $this->weight; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -168,7 +168,7 @@ public function getRule(): ?TrunksLcrRuleDto return $this->rule; } - public function setRuleId($id): static + public function setRuleId(?int $id): static { $value = !is_null($id) ? new TrunksLcrRuleDto($id) @@ -198,7 +198,7 @@ public function getGw(): ?TrunksLcrGatewayDto return $this->gw; } - public function setGwId($id): static + public function setGwId(?int $id): static { $value = !is_null($id) ? new TrunksLcrGatewayDto($id) @@ -228,7 +228,7 @@ public function getOutgoingRouting(): ?OutgoingRoutingDto return $this->outgoingRouting; } - public function setOutgoingRoutingId($id): static + public function setOutgoingRoutingId(?int $id): static { $value = !is_null($id) ? new OutgoingRoutingDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetInterface.php index 1e3b488f4e0..3c6cfaa7c1a 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksLcrRuleTarget/TrunksLcrRuleTargetInterface.php @@ -28,7 +28,10 @@ public function getChangeSet(): array; */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): TrunksLcrRuleTargetDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksLcrRuleTargetDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregAbstract.php index 4e04155559d..0ddae1bae6b 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregAbstract.php @@ -174,7 +174,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrunksUacregDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksUacregDto { return new TrunksUacregDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregDtoAbstract.php index e9169c75c2b..bc01077d45f 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregDtoAbstract.php @@ -105,10 +105,7 @@ abstract class TrunksUacregDtoAbstract implements DataTransferObjectInterface */ private $brand = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -364,6 +361,9 @@ public function getContactAddr(): ?string return $this->contactAddr; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -388,7 +388,7 @@ public function getDdiProviderRegistration(): ?DdiProviderRegistrationDto return $this->ddiProviderRegistration; } - public function setDdiProviderRegistrationId($id): static + public function setDdiProviderRegistrationId(?int $id): static { $value = !is_null($id) ? new DdiProviderRegistrationDto($id) @@ -418,7 +418,7 @@ public function getBrand(): ?BrandDto return $this->brand; } - public function setBrandId($id): static + public function setBrandId(?int $id): static { $value = !is_null($id) ? new BrandDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregInterface.php b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregInterface.php index 8e8ad3e255b..50654337023 100644 --- a/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregInterface.php +++ b/library/Ivoz/Kam/Domain/Model/TrunksUacreg/TrunksUacregInterface.php @@ -37,7 +37,10 @@ public function setAuthProxy(string $authProxy): static; */ public function setLUuid(string $lUuid): static; - public static function createDto(string|int|null $id = null): TrunksUacregDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrunksUacregDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedAbstract.php b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedAbstract.php index b02d0d11c4a..867a6b87b95 100644 --- a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedAbstract.php @@ -90,7 +90,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): TrustedDto + /** + * @param int | null $id + */ + public static function createDto($id = null): TrustedDto { return new TrustedDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedDtoAbstract.php index 8fbdae549ee..886da060630 100644 --- a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedDtoAbstract.php @@ -59,10 +59,7 @@ abstract class TrustedDtoAbstract implements DataTransferObjectInterface */ private $company = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -204,6 +201,9 @@ public function getPriority(): ?int return $this->priority; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -228,7 +228,7 @@ public function getCompany(): ?CompanyDto return $this->company; } - public function setCompanyId($id): static + public function setCompanyId(?int $id): static { $value = !is_null($id) ? new CompanyDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedInterface.php b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedInterface.php index c07fe37843b..8ce0feaa990 100644 --- a/library/Ivoz/Kam/Domain/Model/Trusted/TrustedInterface.php +++ b/library/Ivoz/Kam/Domain/Model/Trusted/TrustedInterface.php @@ -28,7 +28,10 @@ public function getChangeSet(): array; public function setSrcIp(?string $srcIp = null): static; - public static function createDto(string|int|null $id = null): TrustedDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): TrustedDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressAbstract.php index a8cb18ed816..bd4b2d2e306 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressAbstract.php @@ -88,7 +88,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): UsersAddressDto + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersAddressDto { return new UsersAddressDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressDtoAbstract.php index 5a7edddaf43..64a66efedeb 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressDtoAbstract.php @@ -54,10 +54,7 @@ abstract class UsersAddressDtoAbstract implements DataTransferObjectInterface */ private $company = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -185,6 +182,9 @@ public function getDescription(): ?string return $this->description; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -209,7 +209,7 @@ public function getCompany(): ?CompanyDto return $this->company; } - public function setCompanyId($id): static + public function setCompanyId(?int $id): static { $value = !is_null($id) ? new CompanyDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressInterface.php b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressInterface.php index ee459d2317f..ef605870c0b 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressInterface.php +++ b/library/Ivoz/Kam/Domain/Model/UsersAddress/UsersAddressInterface.php @@ -30,7 +30,10 @@ public function setIpAddr(?string $ipAddr = null): static; public function setMask(?int $mask = null): static; - public static function createDto(string|int|null $id = null): UsersAddressDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersAddressDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrAbstract.php index 7b3e3bb395e..1cf5575702f 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrAbstract.php @@ -89,6 +89,16 @@ abstract class UsersCdrAbstract */ protected $xcallid = null; + /** + * @var string + */ + protected $responseCode = '200'; + + /** + * @var ?bool + */ + protected $parsed = false; + /** * @var ?BrandInterface */ @@ -115,11 +125,13 @@ abstract class UsersCdrAbstract protected function __construct( \DateTimeInterface|string $startTime, \DateTimeInterface|string $endTime, - float $duration + float $duration, + string $responseCode ) { $this->setStartTime($startTime); $this->setEndTime($endTime); $this->setDuration($duration); + $this->setResponseCode($responseCode); } abstract public function getId(): null|string|int; @@ -140,7 +152,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): UsersCdrDto + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersCdrDto { return new UsersCdrDto($id); } @@ -186,11 +201,14 @@ public static function fromDto( Assertion::notNull($endTime, 'getEndTime value is null, but non null value was expected.'); $duration = $dto->getDuration(); Assertion::notNull($duration, 'getDuration value is null, but non null value was expected.'); + $responseCode = $dto->getResponseCode(); + Assertion::notNull($responseCode, 'getResponseCode value is null, but non null value was expected.'); $self = new static( $startTime, $endTime, - $duration + $duration, + $responseCode ); $self @@ -203,6 +221,7 @@ public static function fromDto( ->setCallid($dto->getCallid()) ->setCallidHash($dto->getCallidHash()) ->setXcallid($dto->getXcallid()) + ->setParsed($dto->getParsed()) ->setBrand($fkTransformer->transform($dto->getBrand())) ->setCompany($fkTransformer->transform($dto->getCompany())) ->setUser($fkTransformer->transform($dto->getUser())) @@ -229,6 +248,8 @@ public function updateFromDto( Assertion::notNull($endTime, 'getEndTime value is null, but non null value was expected.'); $duration = $dto->getDuration(); Assertion::notNull($duration, 'getDuration value is null, but non null value was expected.'); + $responseCode = $dto->getResponseCode(); + Assertion::notNull($responseCode, 'getResponseCode value is null, but non null value was expected.'); $this ->setStartTime($startTime) @@ -243,6 +264,8 @@ public function updateFromDto( ->setCallid($dto->getCallid()) ->setCallidHash($dto->getCallidHash()) ->setXcallid($dto->getXcallid()) + ->setResponseCode($responseCode) + ->setParsed($dto->getParsed()) ->setBrand($fkTransformer->transform($dto->getBrand())) ->setCompany($fkTransformer->transform($dto->getCompany())) ->setUser($fkTransformer->transform($dto->getUser())) @@ -269,6 +292,8 @@ public function toDto(int $depth = 0): UsersCdrDto ->setCallid(self::getCallid()) ->setCallidHash(self::getCallidHash()) ->setXcallid(self::getXcallid()) + ->setResponseCode(self::getResponseCode()) + ->setParsed(self::getParsed()) ->setBrand(Brand::entityToDto(self::getBrand(), $depth)) ->setCompany(Company::entityToDto(self::getCompany(), $depth)) ->setUser(User::entityToDto(self::getUser(), $depth)) @@ -293,6 +318,8 @@ protected function __toArray(): array 'callid' => self::getCallid(), 'callidHash' => self::getCallidHash(), 'xcallid' => self::getXcallid(), + 'responseCode' => self::getResponseCode(), + 'parsed' => self::getParsed(), 'brandId' => self::getBrand()?->getId(), 'companyId' => self::getCompany()?->getId(), 'userId' => self::getUser()?->getId(), @@ -498,6 +525,32 @@ public function getXcallid(): ?string return $this->xcallid; } + protected function setResponseCode(string $responseCode): static + { + Assertion::maxLength($responseCode, 64, 'responseCode value "%s" is too long, it should have no more than %d characters, but has %d characters.'); + + $this->responseCode = $responseCode; + + return $this; + } + + public function getResponseCode(): string + { + return $this->responseCode; + } + + protected function setParsed(?bool $parsed = null): static + { + $this->parsed = $parsed; + + return $this; + } + + public function getParsed(): ?bool + { + return $this->parsed; + } + protected function setBrand(?BrandInterface $brand = null): static { $this->brand = $brand; diff --git a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrDtoAbstract.php index 1ef97503af2..eab875fe4ae 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrDtoAbstract.php @@ -77,6 +77,16 @@ abstract class UsersCdrDtoAbstract implements DataTransferObjectInterface */ private $xcallid = null; + /** + * @var string|null + */ + private $responseCode = '200'; + + /** + * @var bool|null + */ + private $parsed = false; + /** * @var int|null */ @@ -102,10 +112,7 @@ abstract class UsersCdrDtoAbstract implements DataTransferObjectInterface */ private $friend = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -132,6 +139,8 @@ public static function getPropertyMap(string $context = '', string $role = null) 'callid' => 'callid', 'callidHash' => 'callidHash', 'xcallid' => 'xcallid', + 'responseCode' => 'responseCode', + 'parsed' => 'parsed', 'id' => 'id', 'brandId' => 'brand', 'companyId' => 'company', @@ -158,6 +167,8 @@ public function toArray(bool $hideSensitiveData = false): array 'callid' => $this->getCallid(), 'callidHash' => $this->getCallidHash(), 'xcallid' => $this->getXcallid(), + 'responseCode' => $this->getResponseCode(), + 'parsed' => $this->getParsed(), 'id' => $this->getId(), 'brand' => $this->getBrand(), 'company' => $this->getCompany(), @@ -323,6 +334,33 @@ public function getXcallid(): ?string return $this->xcallid; } + public function setResponseCode(string $responseCode): static + { + $this->responseCode = $responseCode; + + return $this; + } + + public function getResponseCode(): ?string + { + return $this->responseCode; + } + + public function setParsed(?bool $parsed): static + { + $this->parsed = $parsed; + + return $this; + } + + public function getParsed(): ?bool + { + return $this->parsed; + } + + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; @@ -347,7 +385,7 @@ public function getBrand(): ?BrandDto return $this->brand; } - public function setBrandId($id): static + public function setBrandId(?int $id): static { $value = !is_null($id) ? new BrandDto($id) @@ -377,7 +415,7 @@ public function getCompany(): ?CompanyDto return $this->company; } - public function setCompanyId($id): static + public function setCompanyId(?int $id): static { $value = !is_null($id) ? new CompanyDto($id) @@ -407,7 +445,7 @@ public function getUser(): ?UserDto return $this->user; } - public function setUserId($id): static + public function setUserId(?int $id): static { $value = !is_null($id) ? new UserDto($id) @@ -437,7 +475,7 @@ public function getFriend(): ?FriendDto return $this->friend; } - public function setFriendId($id): static + public function setFriendId(?int $id): static { $value = !is_null($id) ? new FriendDto($id) diff --git a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrInterface.php b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrInterface.php index b5a74720984..0cbc6b22783 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrInterface.php +++ b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrInterface.php @@ -32,7 +32,10 @@ public function getOwner(): ?string; */ public function getParty(): ?string; - public static function createDto(string|int|null $id = null): UsersCdrDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersCdrDto; /** * @internal use EntityTools instead @@ -76,6 +79,10 @@ public function getCallidHash(): ?string; public function getXcallid(): ?string; + public function getResponseCode(): string; + + public function getParsed(): ?bool; + public function getBrand(): ?BrandInterface; public function getCompany(): ?CompanyInterface; diff --git a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrRepository.php b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrRepository.php index c8eca0f01dc..d83ba4bd740 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrRepository.php +++ b/library/Ivoz/Kam/Domain/Model/UsersCdr/UsersCdrRepository.php @@ -4,6 +4,7 @@ use Doctrine\Common\Collections\Selectable; use Doctrine\Persistence\ObjectRepository; +use Doctrine\ORM\Query\Expr\OrderBy; interface UsersCdrRepository extends ObjectRepository, Selectable { @@ -33,4 +34,13 @@ public function countInboundCallsInLastMonthByUser(int $userId): int; * * @param int $userId */ public function countOutboundCallsInLastMonthByUser(int $userId): int; + + /** + * This method expects results to be marked as parsed as soon as they're used: + * a.k.a it does not apply any query offset, just a limit + * + * @param array|array $order + * @return \Generator> + */ + public function getUnparsedCallsGeneratorWithoutOffset(int $batchSize, array $order = null): \Generator; } diff --git a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableAbstract.php index e7894aed5b6..f6e9e05177f 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableAbstract.php @@ -82,7 +82,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): UsersHtableDto + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersHtableDto { return new UsersHtableDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableDtoAbstract.php index 6a39f10987b..a98a7caba6d 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableDtoAbstract.php @@ -43,10 +43,7 @@ abstract class UsersHtableDtoAbstract implements DataTransferObjectInterface */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -158,6 +155,9 @@ public function getExpires(): ?int return $this->expires; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableInterface.php b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableInterface.php index 50e7160e14d..af81d544ac7 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableInterface.php +++ b/library/Ivoz/Kam/Domain/Model/UsersHtable/UsersHtableInterface.php @@ -18,7 +18,10 @@ interface UsersHtableInterface extends EntityInterface */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): UsersHtableDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersHtableDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationAbstract.php index 7f781497d04..7c206876cd2 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationAbstract.php @@ -191,7 +191,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): UsersLocationDto + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersLocationDto { return new UsersLocationDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationDtoAbstract.php index 23fd7a87538..eb597dc6f32 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationDtoAbstract.php @@ -128,10 +128,7 @@ abstract class UsersLocationDtoAbstract implements DataTransferObjectInterface */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?int $id = null) { $this->setId($id); } @@ -481,6 +478,9 @@ public function getPartition(): ?int return $this->partition; } + /** + * @param int|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationInterface.php b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationInterface.php index 6c9d20e03bb..84620ab801d 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationInterface.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocation/UsersLocationInterface.php @@ -18,7 +18,10 @@ interface UsersLocationInterface extends EntityInterface */ public function getId(): ?int; - public static function createDto(string|int|null $id = null): UsersLocationDto; + /** + * @param int | null $id + */ + public static function createDto($id = null): UsersLocationDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrAbstract.php index 6f959183a55..a1f8589a97b 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrAbstract.php @@ -92,7 +92,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): UsersLocationAttrDto + /** + * @param string | null $id + */ + public static function createDto($id = null): UsersLocationAttrDto { return new UsersLocationAttrDto($id); } diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrDtoAbstract.php b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrDtoAbstract.php index cb2229d806e..c5728faebb6 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrDtoAbstract.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrDtoAbstract.php @@ -53,10 +53,7 @@ abstract class UsersLocationAttrDtoAbstract implements DataTransferObjectInterfa */ private $id = null; - /** - * @param string|int|null $id - */ - public function __construct($id = null) + public function __construct(?string $id = null) { $this->setId($id); } @@ -196,6 +193,9 @@ public function getLastModified(): \DateTimeInterface|string|null return $this->lastModified; } + /** + * @param string|null $id + */ public function setId($id): static { $this->id = $id; diff --git a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrInterface.php b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrInterface.php index 7359a53fa68..a932aed0712 100644 --- a/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrInterface.php +++ b/library/Ivoz/Kam/Domain/Model/UsersLocationAttr/UsersLocationAttrInterface.php @@ -17,7 +17,10 @@ interface UsersLocationAttrInterface extends EntityInterface */ public function getId(): ?string; - public static function createDto(string|int|null $id = null): UsersLocationAttrDto; + /** + * @param string | null $id + */ + public static function createDto($id = null): UsersLocationAttrDto; /** * @internal use EntityTools instead diff --git a/library/Ivoz/Kam/Domain/Service/TrunksUacreg/CreatedByDdiProviderRegistration.php b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/CreatedByDdiProviderRegistration.php index 895f63cc39c..2c0c0584d26 100644 --- a/library/Ivoz/Kam/Domain/Service/TrunksUacreg/CreatedByDdiProviderRegistration.php +++ b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/CreatedByDdiProviderRegistration.php @@ -63,9 +63,12 @@ public function execute(DdiProviderRegistrationInterface $ddiProviderRegistratio } $trunksIp = $trunks->getIp(); + $contactAddr = $trunks->getAdvertisedIp() + ? $trunks->getAdvertisedIp() + : $trunks->getIp(); $socket = 'udp:' . $trunksIp . ':5060'; - $contactAddr = $trunksIp . ':5060'; + $contactAddr .= ':5060'; $trunksUacregDto ->setSocket($socket) diff --git a/library/Ivoz/Kam/Domain/Service/TrunksUacreg/SyncValuesByDdiProvider.php b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/SyncValuesByDdiProvider.php new file mode 100644 index 00000000000..f059f20aad3 --- /dev/null +++ b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/SyncValuesByDdiProvider.php @@ -0,0 +1,56 @@ +getDdiProviderRegistrations(); + $trunks = $ddiProvider->getProxyTrunk(); + + if (is_null($trunks)) { + $trunks = $this->proxyTrunkRepository->getProxyMainAddress(); + } + + foreach ($ddiProviderRegistrations as $ddiProviderRegistration) { + $trunksUacreg = $ddiProviderRegistration->getTrunksUacreg(); + + if (is_null($trunksUacreg)) { + continue; + } + + /** @var TrunksUacregDto $trunksUacregDto */ + $trunksUacregDto = $this->entityTools->entityToDto($trunksUacreg); + + $trunksIp = $trunks->getIp(); + $contactAddr = $trunks->getAdvertisedIp() + ? $trunks->getAdvertisedIp() + : $trunks->getIp(); + + $socket = 'udp:' . $trunksIp . ':5060'; + $contactAddr .= ':5060'; + + $trunksUacregDto + ->setSocket($socket) + ->setContactAddr($contactAddr); + + $this->entityTools->persistDto($trunksUacregDto, $trunksUacreg); + } + } +} diff --git a/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByDdiProvider.php b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByDdiProvider.php new file mode 100644 index 00000000000..6fe118623e4 --- /dev/null +++ b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByDdiProvider.php @@ -0,0 +1,45 @@ + + */ + public static function getSubscribedEvents(): array + { + return [ + self::EVENT_POST_PERSIST => self::POST_PERSIST_PRIORITY + ]; + } + + /** + * @throws \Exception + */ + public function execute(DdiProviderInterface $ddiProvider): void + { + if ($ddiProvider->isNew()) { + return; + } + + if (!$ddiProvider->hasChanged('proxyTrunkId')) { + return; + } + + $this->syncValuesByDdiProvider->execute($ddiProvider); + } +} diff --git a/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByProxyTrunk.php b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByProxyTrunk.php new file mode 100644 index 00000000000..e0078512481 --- /dev/null +++ b/library/Ivoz/Kam/Domain/Service/TrunksUacreg/UpdateByProxyTrunk.php @@ -0,0 +1,55 @@ + + */ + public static function getSubscribedEvents(): array + { + return [ + self::EVENT_POST_PERSIST => self::POST_PERSIST_PRIORITY + ]; + } + + public function execute(ProxyTrunkInterface $proxyTrunk): void + { + if ($proxyTrunk->isNew()) { + return; + } + + $proxyTrunkHasChangedIp = $proxyTrunk->hasChanged("ip") || $proxyTrunk->hasChanged("advertisedIp") ; + if (!$proxyTrunkHasChangedIp) { + return; + } + + $ddiProviders = $this + ->ddiProviderRepository + ->findByProxyTrunks($proxyTrunk); + + if (empty($ddiProviders)) { + return; + } + + foreach ($ddiProviders as $ddiProvider) { + $this->syncValuesByDdiProvider->execute($ddiProvider); + } + } +} diff --git a/library/Ivoz/Kam/Domain/Service/UsersCdr/SetParsed.php b/library/Ivoz/Kam/Domain/Service/UsersCdr/SetParsed.php new file mode 100644 index 00000000000..35350a66609 --- /dev/null +++ b/library/Ivoz/Kam/Domain/Service/UsersCdr/SetParsed.php @@ -0,0 +1,33 @@ +entityTools->entityToDto( + $usersCdr + ); + $usersCdrDto->setParsed(true); + $this->entityTools->persistDto( + $usersCdrDto, + $usersCdr, + $dispatchImmediately + ); + } +} diff --git a/library/Ivoz/Kam/Infrastructure/Persistence/Doctrine/Mapping/UsersCdr.UsersCdrAbstract.orm.xml b/library/Ivoz/Kam/Infrastructure/Persistence/Doctrine/Mapping/UsersCdr.UsersCdrAbstract.orm.xml index ed114a780d7..b2cec320b68 100644 --- a/library/Ivoz/Kam/Infrastructure/Persistence/Doctrine/Mapping/UsersCdr.UsersCdrAbstract.orm.xml +++ b/library/Ivoz/Kam/Infrastructure/Persistence/Doctrine/Mapping/UsersCdr.UsersCdrAbstract.orm.xml @@ -7,6 +7,7 @@ + @@ -71,6 +72,16 @@