Skip to content

Commit

Permalink
Merge commit for 4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Mar 22, 2024
2 parents 86746f6 + 654cf53 commit 8f0bb92
Show file tree
Hide file tree
Showing 65 changed files with 46,548 additions and 33,650 deletions.
19 changes: 19 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Thu, 21 Mar 2024 08:50:54 +0100 IvozProvider Team <[email protected]>

* IvozProvider 4.0.3 released

* Portals
- Fixed a bug while displaying terminal provisioning template test dialog
- Fixed a bug while displaying Domain filtering options
- Added missing ACL entries for Holiday Date ranges
- Invoice Numbers prefix is now optional
- Increased inactivity timeout in Active Calls to one hour
- Updated Active calls call direction icons

* Provisioning
- Fixed a bug that prevented running PHP code in terminal provisioning templates

* Proxies
- Fixed a bug with Cisco Phones BLF Subscriptions
- Fixed behind-nat and proxied UAC SUBSCRIBE routing

Tue, 12 Mar 2024 11:33:49 +0100 IvozProvider Team <[email protected]>

* IvozProvider 4.0.2 released
Expand Down
39 changes: 29 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pipeline {
SYMFONY_PHPUNIT_DIR = "/opt/phpunit/"
SYMFONY_PHPUNIT_VERSION = "9.5.3"
DOCKER_IMAGE_TAG = getDockerImageTag()
BASE_BRANCH = getBaseBranch()
JIRA_TICKET = getJiraTicket()
}

Expand All @@ -42,7 +43,21 @@ pipeline {
}
}
}

// --------------------------------------------------------------------
// Generic Project pipeline tests
// --------------------------------------------------------------------
stage('Generic') {
agent {
docker {
image "ironartemis/ivozprovider-testing-base:${env.DOCKER_IMAGE_TAG}"
args '--user jenkins --volume ${WORKSPACE}:/opt/irontec/ivozprovider'
reuseNode true
}
}
steps {
sh "/opt/irontec/ivozprovider/library/bin/test-commit-tags origin/${env.BASE_BRANCH}"
}
}
// --------------------------------------------------------------------
// Backend Testing stage
// --------------------------------------------------------------------
Expand All @@ -56,7 +71,7 @@ pipeline {
expression { hasCommitTag("microservice:") }
expression { hasCommitTag("rest") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
stages {
Expand Down Expand Up @@ -302,7 +317,7 @@ pipeline {
expression { hasLabel("ci-force-tests-back") }
expression { hasCommitTag("schema:") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
steps {
Expand Down Expand Up @@ -340,7 +355,7 @@ pipeline {
expression { hasLabel("ci-force-tests") }
expression { hasCommitTag("portal") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
stages {
Expand All @@ -366,7 +381,7 @@ pipeline {
expression { hasCommitTag("portal:") }
expression { hasCommitTag("portal/platform:") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
agent {
Expand Down Expand Up @@ -394,7 +409,7 @@ pipeline {
expression { hasCommitTag("portal:") }
expression { hasCommitTag("portal/brand:") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
agent {
Expand Down Expand Up @@ -422,7 +437,7 @@ pipeline {
expression { hasCommitTag("portal:") }
expression { hasCommitTag("portal/client:") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
agent {
Expand Down Expand Up @@ -450,7 +465,7 @@ pipeline {
expression { hasCommitTag("portal:") }
expression { hasCommitTag("portal/user:") }
branch "bleeding"
branch "halliday"
branch "tempest"
}
}
agent {
Expand Down Expand Up @@ -551,6 +566,10 @@ boolean hasCommitTag(String module) {
) == 0
}

void getBaseBranch() {
return env.CHANGE_TARGET ?: env.GIT_BRANCH
}

void getDockerImageTag() {
return env.CHANGE_TARGET ?: env.GIT_BRANCH
}
Expand Down Expand Up @@ -580,7 +599,7 @@ void notifyUnstableGithub() {
}

void notifyFailureMattermost() {
if (env.GIT_BRANCH == 'bleeding' || env.GIT_BRANCH == 'halliday') {
if (env.GIT_BRANCH == 'bleeding' || env.GIT_BRANCH == 'tempest') {
mattermostSend([
channel: "#comms-provider",
color: "#FF0000",
Expand All @@ -590,7 +609,7 @@ void notifyFailureMattermost() {
}

void notifyFixedMattermost() {
if (env.GIT_BRANCH == 'bleeding' || env.GIT_BRANCH == 'halliday') {
if (env.GIT_BRANCH == 'bleeding' || env.GIT_BRANCH == 'tempest') {
mattermostSend([
channel: "#comms-provider",
color: "#008000",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ If you want to test an [standalone](https://irontec.github.io/ivozprovider/en/ar
| 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.2) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-4.0~4.0.0-tempest-amd64.iso) | |
| testing (tempest 4.0.3) | [![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).
Expand Down
11 changes: 9 additions & 2 deletions asterisk/agi/src/Agi/Action/ExternalFilterAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Agi\Wrapper;
use Ivoz\Provider\Domain\Model\CalendarPeriod\CalendarPeriodInterface;
use Ivoz\Provider\Domain\Model\Company\CompanyInterface;
use Ivoz\Provider\Domain\Model\Ddi\DdiInterface;
use Ivoz\Provider\Domain\Model\ExternalCallFilter\ExternalCallFilterInterface;
use Ivoz\Provider\Domain\Model\HolidayDate\HolidayDateInterface;
Expand Down Expand Up @@ -117,10 +118,13 @@ public function processHoliday()
// Play holiday louction
$this->agi->playbackLocution($locution);

/** @var CompanyInterface $company */
$company = $ddi->getCompany();

// Set Diversion information
$count = $this->agi->getRedirecting('count');
$this->agi->setRedirecting('count,i', ++$count);
$this->agi->setRedirecting('from-name,i', $ddi->getCompany()->getName());
$this->agi->setRedirecting('from-name,i', $company->getName());
$this->agi->setRedirecting('from-num,i', $ddi->getDDIE164());
$this->agi->setRedirecting('reason', 'time_of_day');

Expand Down Expand Up @@ -168,10 +172,13 @@ public function processOutOfSchedule()
// Play holiday locution
$this->agi->playbackLocution($locution);

/** @var CompanyInterface $company */
$company = $ddi->getCompany();

// Set Diversion information
$count = $this->agi->getRedirecting('count');
$this->agi->setRedirecting('count,i', ++$count);
$this->agi->setRedirecting('from-name,i', $ddi->getCompany()->getName());
$this->agi->setRedirecting('from-name,i', $company->getName());
$this->agi->setRedirecting('from-num,i', $ddi->getDDIE164());
$this->agi->setRedirecting('reason', 'time_of_day');

Expand Down
11 changes: 9 additions & 2 deletions asterisk/agi/src/Agi/Agents/DdiAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Agi\Agents;

use Agi\Wrapper;
use Ivoz\Provider\Domain\Model\Company\CompanyInterface;
use Ivoz\Provider\Domain\Model\Ddi\DdiInterface;

class DdiAgent implements AgentInterface
Expand Down Expand Up @@ -41,7 +42,10 @@ public function getId()

public function getCompany()
{
return $this->ddi->getCompany();
/** @var CompanyInterface $company */
$company = $this->ddi->getCompany();

return $company;
}

public function getLanguageCode()
Expand All @@ -55,7 +59,10 @@ public function getOutgoingDdi($destination)
$ddi = $this->ddi;

// If user has OutgoingDDI rules, check if we have to override current DDI
$outgoingDDIRule = $this->getCompany()->getOutgoingDDIRule();
/** @var CompanyInterface $company */
$company = $this->getCompany();

$outgoingDDIRule = $company->getOutgoingDDIRule();
if ($outgoingDDIRule) {
$this->agi->verbose("Checking %s for destination %s", $outgoingDDIRule, $destination);
// Check if outgoing DDI rule matches for given destination
Expand Down
2 changes: 2 additions & 0 deletions asterisk/agi/src/Dialplan/Trunks.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Agi\Wrapper;
use Assert\Assertion;
use Doctrine\ORM\EntityManagerInterface;
use Ivoz\Provider\Domain\Model\Company\CompanyInterface;
use Ivoz\Provider\Domain\Model\Ddi\Ddi;
use RouteHandlerAbstract;

Expand Down Expand Up @@ -87,6 +88,7 @@ public function process()
$this->agi->setVariable("__CALL_ID", $this->agi->getCallId());

// Get company MusicClass: company, Generic or default
/** @var CompanyInterface $company */
$company = $ddi->getCompany();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("CHANNEL(musicclass)", $company->getMusicClass());
Expand Down
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
ivozprovider (4.0~4.0.2) UNRELEASED; urgency=medium
ivozprovider (4.0~4.0.3) UNRELEASED; urgency=medium

* Version bump to 4.0.3

-- Irontec IvozProvider Team <[email protected]> Thu, 21 Mar 2024 09:06:33 +0100

ivozprovider (4.0~4.0.2) unstable; urgency=medium

* Version bump to 4.0.2

Expand Down
2 changes: 1 addition & 1 deletion debian/ivozprovider-web-admin.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chmod 777 /opt/irontec/ivozprovider/web/admin/application/cache
rm -fr /opt/irontec/ivozprovider/web/admin/application/cache/*

# Change invoice-template-tester dir owner
chown www-data.www-data /opt/irontec/ivozprovider/web/admin/public/invoice-template-tester
chown www-data:www-data /opt/irontec/ivozprovider/web/admin/public/invoice-template-tester

# Setup portal language
db_get ivozprovider/language
Expand Down
34 changes: 34 additions & 0 deletions doc/dev/AcceptedCommitTagsList.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
agi
as
asterisk
ci
core
data
doc
kamailio
kamtrunks
kamusers
microservices
microservices/balances
microservices/provision
microservices/realtime
microservices/recordings
microservices/router
microservices/scheduler
microservices/workers
pkg
portal
portal/brand
portal/client
portal/platform
portal/users
proxy
rest/brand
rest/client
rest/platform
rest/users
schema
systemd
tests
web/admin
web/user
24 changes: 3 additions & 21 deletions doc/dev/en/commits.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,9 @@ Preferably the commit message will have a descriptive first line with a prefix
that will reference the most changed section by the commit. This line must not
be larger than 60 chars, as recommendation.

While this prefixs are not fixed, it is recommended to use the already existing
ones in the git log history.

- doc: Changes in documentation (no source code changed)
- web/admin: Changes for web, portals klears, and so on
- web/rest: Changes in API entities and endpoints
- web/user: Changes in user angular based portal
- kamtrunks: Changes in proxys working with trunks
- kamusers: Changes in proxys working with users
- agis: Changes that affect logic of PBX
- schema: Changes that only affect database tables structures
- core: Changes in data entities (almost everything under libray dir)
- i18n: Internalization or translation changes
- pkg: Changes related to debian package system
- tests: Changes affecting how CI test behave
- ...

Tags can be as especific as required and could reference some services like
fax:, provisioning: or invoicer:

Commit messages have optionaly a long description from second line onwards. This
For a list of valid commit tags check doc/dev/AcceptedCommitTagsList.txt

Commit messages have optionally a long description from second line onwards. This
description can contain a mantis or gitlab issue code.


Expand Down
2 changes: 1 addition & 1 deletion kamailio/trunks/config/apiban.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modparam("rtimer", "timer", "name=apiban;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=apiban;route=APIBAN")

route[APIBAN] {
# replace MYAPIKEY with your apiban.org API key.
# replace with your apiban.org API key.
$var(apikey) = "MYAPIKEY";

if($sht(apibanctl=>ID) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion kamailio/users/config/apiban.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modparam("rtimer", "timer", "name=apiban;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=apiban;route=APIBAN")

route[APIBAN] {
# replace MYAPIKEY with your apiban.org API key.
# replace with your apiban.org API key.
$var(apikey) = "MYAPIKEY";

if($sht(apibanctl=>ID) == 0) {
Expand Down
9 changes: 6 additions & 3 deletions kamailio/users/config/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2186,8 +2186,6 @@ route[NATDETECT] {

if (is_method("REGISTER")) {
fix_nated_register();
} else if (is_method("SUBSCRIBE")) {
fix_nated_contact();
} else {
if(is_first_hop()) {
# Sets ;alias only if received ip and port differ from those in contact URI
Expand Down Expand Up @@ -2409,7 +2407,7 @@ route[CHECK_SPECIAL] {

route[SAVE_CONTACT] {
if (!is_present_hf("Contact")) return;
if (!is_method("INVITE")) return;
if (!is_method("INVITE|SUBSCRIBE")) return;

if ($ct =~ "<.*>") {
# Contact has < >
Expand All @@ -2436,6 +2434,11 @@ route[FIX_RURI] {

xwarn("[$dlg_var(cidhash)] FIX-RURI: Fix overridden contact ($ru -> $sht(dialogs=>$ci::contact::$tt))\n");
$ru = $sht(dialogs=>$ci::contact::$tt);

if (is_method("SUBSCRIBE")) {
# Avoid key expiration
$sht(dialogs=>$ci::contact::$tt) = $sht(dialogs=>$ci::contact::$tt);
}
}

#!ifdef WITH_REALTIME
Expand Down
Loading

0 comments on commit 8f0bb92

Please sign in to comment.