Skip to content

Commit

Permalink
Merge commit for 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Jun 28, 2024
2 parents 34aa327 + a894c7e commit 475b939
Show file tree
Hide file tree
Showing 1,148 changed files with 29,170 additions and 292,868 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#### Checklist:
- [ ] Commits are named and have tag following [commit rules](https://github.com/irontec/ivozprovider/blob/bleeding/doc/dev/en/commits.md)
- [ ] Commits are split per component (schema, web/admin, kamusers, agis, ..)
- [ ] Commits are split per component (schema, portal/platform, kamusers, agis, ..)
- [ ] Changes have been tested locally
- [ ] Fixes an existing issue (Fixes #XXXX) <!-- Replace XXXX with issue id -->
- [ ] Upport from existing Pull request #XXXX
Expand Down
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ mount-storage.sh
**.phplint-cache
**.phpunit.result.cache
**/.nvmrc
web/admin/storage
web/admin/application/cache/*
web/admin/public/img/
web/admin/public/styles/
web/admin/public/fonts/

web/user/index.phtml
web/user/scripts/
web/user/app/styles/main.css.map
web/user/app/styles/main.css

web/portal/client/.history

Expand Down
38 changes: 38 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
Thu, 27 Jun 2024 13:00:34 +0200 IvozProvider Team <[email protected]>

* IvozProvider 4.1.0 released

* Proxies:
- kamusers: fixed media-relay interface for AoRs with just one contact #2642
- kamusers: used new ruri_domain for static location #2640
- kamusers: avoid fast media liberation delayer for non-SDP INVITE/UPDATEs #2691
- kamtrunks: use carrier server from_domain in Diversion (if any) #2658
- kamtrunks: remove fast media liberation delayer #2691
- kamailio: make acc cdr inserts async #2660

* Portals
- Removed Zendframework based administration portal (klear) #2670
- Removed AngularJS based user portal #2669
- Generic voicemail can now be binded to multiple users #2633
- User voicemails are now displayed in user portal #2643
- Client administators no longer can access users voicemails #2663
- Faxes can now be binded to multiple users #2655
- Faxes are now displayed in user portal #2661
- Added actions to mass edit Administation ACL permissions #2632
- Fixed missing translations in client portal #2651
- Fixed a bug that prevented Holiday dates edition #2685
- Friends can not be managed in Brand administration portal #2666
- Fixed Billable calls historic rotator microservice #2690
- Improved Date selectors in filtering forms #2664
- Fixed timezone conversion while filtering by Date #2678
- Manage direct connectivity retail accounts / residential devices / friends at brand level #2650
- Add R-URI domain and outbound proxy parameters to direct connectivity retail accounts / residential devices / friends #2641
- Add KamUsers socket to direct connectivity retail accounts / residential devices / friends #2671
- Add trust SDP addresses toggle to direct connectivity retail accounts / residential devices / friends #2674

* Application Servers
- Decrease sorcery cache lifetime to 120 #2648
- Limit fastagi service duration to 300 seconds #2652
- Removed specific AGI for setting outbound calls X-Info headers #2665
- Implemented a simple version of Huntgroups when all members are users #2668

Mon, 29 Apr 2024 09:07:23 +0200 IvozProvider Team <[email protected]>

* IvozProvider 4.0.5 released
Expand Down
71 changes: 67 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,46 @@ pipeline {
}
}
}

// --------------------------------------------------------------------
// Packaging Testing stage
// --------------------------------------------------------------------
stage ('package') {
when {
anyOf {
expression { hasLabel("packaging") }
expression { hasCommitTag("pkg:") }
}
}
stages {
stage ('package-image') {
steps {
dir ('debian') {
script {
docker.build("ivozprovider-package-testing:${env.CHANGE_ID}")
}
}
}
}
stage ('package-build') {
agent {
docker {
image "ivozprovider-package-testing:${env.CHANGE_ID}"
args "--entrypoint= --volume ${WORKSPACE}:/build/source"
reuseNode true
}
}
steps {
sh "cd /build/source && dpkg-buildpackage -b"
}
}
}
post {
success { notifySuccessGithub() }
failure { notifyFailureGithub() }
}
}
//
// --------------------------------------------------------------------
// Functional Testing stage
// --------------------------------------------------------------------
Expand All @@ -500,11 +540,17 @@ pipeline {
return
}

if (!env.CHANGE_ID) {
echo "Not a Pull request."
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}"
pullRequest.addLabel('functional-review')
} else {
println "No functional reviewer assigned."
}
Expand All @@ -518,9 +564,26 @@ pipeline {
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."
// For Issues with Functional reviewer
if (issue.data.fields.customfield_10105) {
// Not validated
if (status.id != "10325") {
// Ensure the PR is not already marked as changed requested
def lastFuncReviewStatus
for (review in pullRequest.reviews) {
if (review.user == "ironArt3mis") {
lastFuncReviewStatus = review.state
}
}
// PR already marked as review requested
if (lastFuncReviewStatus == "CHANGES_REQUESTED") {
echo "This PR is already marked as functional review required"
return
}
pullRequest.review('REQUEST_CHANGES', 'Functional review required')
} else {
pullRequest.review('APPROVE')
}
}
}
}
Expand Down Expand Up @@ -560,7 +623,7 @@ boolean hasLabel(String label) {
}

boolean hasCommitTag(String module) {
return !env.CHANGE_TARGET || sh(
return env.CHANGE_TARGET && sh(
returnStatus: true,
script: "git log --oneline origin/${env.CHANGE_TARGET}...${env.GIT_COMMIT} | grep ${module}"
) == 0
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="web/admin/public/images/logoprovider.png" width="350"> ![stable](https://raster.shields.io/badge/stable-3.4-blue.png) ![release](https://raster.shields.io/badge/release-halliday-14b9bc.png)
<img src="doc/images/logoprovider.png" width="350"> ![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.

Expand Down Expand Up @@ -48,10 +48,10 @@ If you want to test an [standalone](https://irontec.github.io/ivozprovider/en/ar

| 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.5) | [![iso http](web/admin/public/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-4.0~4.0.0-tempest-amd64.iso) | |
| oldoldstable (oasis 1.7) | [![iso http](doc/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-amd64.iso) | [![iso http](doc/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-1.7.1-oasis-i386.iso)|
| oldstable (artemis 2.23.0) | [![iso http](doc/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](doc/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-3.4~3.4.1-halliday-amd64.iso) | |
| testing (tempest 4.1.0) | [![iso http](doc/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-4.1~4.1.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 All @@ -62,8 +62,8 @@ You can browse online documentation in different formats:

| Language | HTML | LaTeX | PDF | EPUB |
|----------|:----:|:-----:|:---:|:----:|
| Spanish | [![badge html](web/admin/public/images/doc-html-green.png)](https://irontec.github.io/ivozprovider/es/artemis) [![badge singlehtml](web/admin/public/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/essingle/artemis) | [![badge latex](web/admin/public/images/doc-latex-ff69b4.png)](https://irontec.github.io/ivozprovider/eslatex/artemis/IvozProvider.tex) | [![badge pdf](web/admin/public/images/doc-pdf-blue.png)](https://irontec.github.io/ivozprovider/eslatex/artemis/IvozProvider.pdf) | [![badge epub](web/admin/public/images/doc-epub-orange.png)](https://irontec.github.io/ivozprovider/esepub/artemis/IvozProvider.epub) |
| English | [![badge html](web/admin/public/images/doc-html-green.png)](https://irontec.github.io/ivozprovider/en/artemis) [![badge singlehtml](web/admin/public/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/ensingle/artemis) | [![badge latex](web/admin/public/images/doc-latex-ff69b4.png)](https://irontec.github.io/ivozprovider/enlatex/artemis/IvozProvider.tex) | [![badge pdf](web/admin/public/images/doc-pdf-blue.png)](https://irontec.github.io/ivozprovider/enlatex/artemis/IvozProvider.pdf) | [![badge epub](web/admin/public/images/doc-epub-orange.png)](https://irontec.github.io/ivozprovider/enepub/artemis/IvozProvider.epub) |
| Spanish | [![badge html](doc/images/doc-html-green.png)](https://irontec.github.io/ivozprovider/es/artemis) [![badge singlehtml](doc/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/essingle/artemis) | [![badge latex](doc/images/doc-latex-ff69b4.png)](https://irontec.github.io/ivozprovider/eslatex/artemis/IvozProvider.tex) | [![badge pdf](doc/images/doc-pdf-blue.png)](https://irontec.github.io/ivozprovider/eslatex/artemis/IvozProvider.pdf) | [![badge epub](doc/images/doc-epub-orange.png)](https://irontec.github.io/ivozprovider/esepub/artemis/IvozProvider.epub) |
| English | [![badge html](doc/images/doc-html-green.png)](https://irontec.github.io/ivozprovider/en/artemis) [![badge singlehtml](doc/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/ensingle/artemis) | [![badge latex](doc/images/doc-latex-ff69b4.png)](https://irontec.github.io/ivozprovider/enlatex/artemis/IvozProvider.tex) | [![badge pdf](doc/images/doc-pdf-blue.png)](https://irontec.github.io/ivozprovider/enlatex/artemis/IvozProvider.pdf) | [![badge epub](doc/images/doc-epub-orange.png)](https://irontec.github.io/ivozprovider/enepub/artemis/IvozProvider.epub) |


## Feedback & Questions
Expand Down
4 changes: 2 additions & 2 deletions asterisk/agi/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 25 additions & 3 deletions asterisk/agi/src/Agi/Action/HuntGroupAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public function process()
return;
}

$this->agi->notice("Processing %s HuntGroup %s", $huntGroup->getStrategy(), $huntGroup);
$huntGroupIsSimple = $huntGroup->isSimple();
$this->agi->notice(
"Processing %s HuntGroup %s (simple: %s)",
$huntGroup->getStrategy(),
$huntGroup,
$huntGroupIsSimple
);

/** @var HuntGroupMemberInterface[] $huntGroupMembers */
$huntGroupMembers = $huntGroup->getHuntGroupMembers(
Expand All @@ -67,7 +73,19 @@ public function process()
$huntGroupTimeouts = array();

foreach ($huntGroupMembers as $entry) {
array_push($huntGroupEndpoints, 'Local/' . $entry->getId() . '@call-huntgroup-member');
if ($huntGroupIsSimple) {
$user = $entry->getUser();
if (!$user) {
continue;
}
$terminal = $user->getTerminal();
$userIsAvailable = $user->getDoNotDisturb() == false;
if ($terminal && $userIsAvailable) {
array_push($huntGroupEndpoints, 'PJSIP/' . $terminal->getSorcery());
}
} else {
array_push($huntGroupEndpoints, 'Local/' . $entry->getId() . '@call-huntgroup-member');
}
array_push($huntGroupTimeouts, $entry->getTimeoutTime());
}

Expand All @@ -83,6 +101,10 @@ public function process()
}

// Start calling the first user
$this->agi->redirect('call-huntgroup');
if ($huntGroupIsSimple) {
$this->agi->redirect('call-huntgroup-simple');
} else {
$this->agi->redirect('call-huntgroup');
}
}
}
9 changes: 8 additions & 1 deletion asterisk/agi/src/Agi/Action/HuntGroupStatusAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public function process()
return;
}

// Check if this is an only user hunt-group
$huntGroupIsSimple = $huntGroup->isSimple();

// Check pending calls
$huntGroupEndpoints = explode(';', $this->agi->getVariable("HG_ENDPOINTLIST"));
$huntGroupTimeouts = explode(';', $this->agi->getVariable("HG_TIMEOUTLIST"));
Expand Down Expand Up @@ -103,6 +106,10 @@ public function process()
$this->agi->setVariable("HG_TIMEOUTLIST", join(';', $huntGroupTimeouts));

// Call next!
$this->agi->redirect('call-huntgroup');
if ($huntGroupIsSimple) {
$this->agi->redirect('call-huntgroup-simple');
} else {
$this->agi->redirect('call-huntgroup');
}
}
}
7 changes: 6 additions & 1 deletion asterisk/agi/src/Dialplan/FaxDial.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ public function process()
}

// Set Company information
$this->agi->setVariable("__COMPANYID", $faxOut->getFax()->getCompany()->getId());
$fax = $faxOut->getFax();
$company = $fax->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());

// Convert fax file from PDF to TIFF
$pdfFile = $this->faxStoragePathResolver->getFilePath($faxOut);
Expand Down
3 changes: 3 additions & 0 deletions asterisk/agi/src/Dialplan/Friends.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public function process()

// Set Company/Brand/Generic Music class
$company = $friend->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());

// Check User's permission to does this call
$exten = $this->agi->getExtension();
Expand Down
2 changes: 2 additions & 0 deletions asterisk/agi/src/Dialplan/Residentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function process()
$company = $residential->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("CHANNEL(language)", $company->getLanguageCode());

// Get call destination
Expand Down
3 changes: 3 additions & 0 deletions asterisk/agi/src/Dialplan/Retails.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public function process()

// Set Company/Brand/Generic Music class
$company = $retailAccount->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("CHANNEL(language)", $company->getLanguageCode());

// Get call destination
Expand Down
3 changes: 3 additions & 0 deletions asterisk/agi/src/Dialplan/Trunks.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public function process()
// Get company MusicClass: company, Generic or default
/** @var CompanyInterface $company */
$company = $ddi->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("CHANNEL(musicclass)", $company->getMusicClass());
$this->agi->setVariable("CHANNEL(language)", $ddi->getLanguageCode());

Expand Down
4 changes: 4 additions & 0 deletions asterisk/agi/src/Dialplan/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ public function process()

// Set Company/Brand/Generic Music class
$company = $caller->getCompany();
$brand = $company->getBrand();
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("__ONDEMANDCODE", $company->getOnDemandRecordCode());

// Mark this call as generated from user
$this->agi->setVariable("__CALL_TYPE", "internal");
Expand Down
Loading

0 comments on commit 475b939

Please sign in to comment.