Skip to content

Commit

Permalink
Merge tag 'v2.3.0' into artemis
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Jun 7, 2018
2 parents 9940a8d + ad2d925 commit 8f957fc
Show file tree
Hide file tree
Showing 533 changed files with 10,329 additions and 5,231 deletions.
38 changes: 38 additions & 0 deletions ChangeLog
@@ -1,3 +1,41 @@
Thu, 07 Jun 2018 13:40:17 +0200 IvozProvider Team <dev@list-ivozprovider.irontec.com>

* IvozProvider 2.3 released

* Wholesale:

- Added support for audio transcoding using rtpengine
- Added support for routing tags

* Proxies:

- Upgraded Kamailio version to 5.1.2
- Improved DDI Bouncing logic (outgoing calls to platform DDIs)
- Refactored configuration files routes
- PeerServers with unresolvable domains are now skipped

* Routing:

- Added support for routing based on routing tags
- Removed support for regular expressions in routing patterns

* PBX:

- Fixed a bug on external calls forwarded to external numbers

* Web:

- Added english translation for user portal
- Menu entries are now properly displayed based on enabled features

* Core:

- Reworked Kamailio LCR rules logic

* Provisioning:

- Added latest Cisco combined CA

Fri, 04 May 2018 15:38:00 +0200 IvozProvider Team <dev@list-ivozprovider.irontec.com>

* IvozProvider 2.2 released
Expand Down
22 changes: 11 additions & 11 deletions README.md
Expand Up @@ -17,7 +17,7 @@ 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 4.4](https://www.kamailio.org/w/)
- Powered by [Kamailo SIP Server 5.1](https://www.kamailio.org/w/)

* Portal:
- Provides **Web interfaces** for all platform roles
Expand All @@ -32,29 +32,29 @@ From its beginning, IvozProvider was designed to be installed distributed betwee

* Data:
- Provides database and shared storage for the rest of machines
- Powered by [MySQL 5.5 Server](http://www.mysql.com/)
- Powered by [MySQL 5.7 Server](http://www.mysql.com/)

And [many others](https://irontec.github.io/ivozprovider/en/intro/what_is_inside.html) open source projects.
And [many others](https://irontec.github.io/ivozprovider/en/artemis/basics/intro/what_is_inside.html) open source projects.

Bear in mind that, while at least one of each profile must be installed for the platform to work, there can be multiple machines of each profile and all of them can also be installed in the same machine (a.k.a. standalone installation).

![scaling](web/admin/public/images/horizontalscaling.png)

#### Cloud Service
IvozProvider is designed to work directly from the Internet. Although it can be used in local environments, being exposed to the public network [has it's advantages](https://irontec.github.io/ivozprovider/en/intro/what_is_ivozprovider.html#exposed-to-the-public-network)
IvozProvider is designed to work directly from the Internet. Although it can be used in local environments, being exposed to the public network [has it's advantages](https://irontec.github.io/ivozprovider/en/artemis/basics/intro/what_is_ivozprovider.html#exposed-to-the-public-network)

## Installation

There are [several ways](https://irontec.github.io/ivozprovider/en/installation) to install IvozProvider.
There are [several ways](https://irontec.github.io/ivozprovider/en/artemis/basics/installation) to install IvozProvider.

If you want to test an [standalone](https://irontec.github.io/ivozprovider/en/installation/install_types.html#instalacion-standalone) installation, we recommend using one of auto-install CDs based on Debian Jessie 9.4 amd64.
If you want to test an [standalone](https://irontec.github.io/ivozprovider/en/artemis/basics/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 |
|----------|:--------:|:-------:|
|stable (oasis 1.7) | [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-1.7.0-oasis-amd64.iso)| [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-1.7.0-oasis-i386.iso)|
|testing (artemis 2.2.0) | [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-2.2~2.2.0-artemis-amd64.iso)| [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-2.2~2.2.0-artemis-i386.iso)|
|experimental (bleeding 2.3.0) | |
|testing (artemis 2.3.0) | [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-2.3~2.3.0-artemis-amd64.iso)| [![iso http](web/admin/public/images/iso-http-green.png)](http://packages.irontec.com/isos/ivozprovider-2.3~2.3.0-artemis-i386.iso)|
|experimental (bleeding 2.4.0) | |


## Documentation
Expand All @@ -63,8 +63,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) [![badge singlehtml](web/admin/public/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/essingle) | [![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) [![badge singlehtml](web/admin/public/images/doc-singlehtml-green.png)](https://irontec.github.io/ivozprovider/ensingle) | [![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](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) |


## Feedback & Questions
Expand All @@ -77,7 +77,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-2016 Irontec S.L.
Copyright (C) 2014-2018 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
Expand Down
25 changes: 0 additions & 25 deletions asterisk/agi/src/Agi/Action/ExternalCallAction.php
Expand Up @@ -68,31 +68,6 @@ protected function checkDDIRecording($ddi)
}
}

/**
* @brief Check if the dialed external number belongs to our platform
*
* If outgoing number belongs to our platform we will mark it with a header
* before placing the call to proxytrunks. This will allow to handle it as
* an incoming call with a new callid.
*
* @param string $number dialed number in E.164 format
*/
protected function checkDDIBounced($number)
{
/** @var \Ivoz\Provider\Domain\Model\Ddi\DdiRepository $ddiRepository */
$ddiRepository = $this->em->getRepository('Ivoz\Provider\Domain\Model\DDi\Ddi');

/** @var \Ivoz\Provider\Domain\Model\Ddi\DdiInterface $internalDDI */
$internalDDI = $ddiRepository->findOneBy([
"ddie164" => $number
]);

if (!empty($internalDDI)) {
$this->agi->notice("DDI $number belongs to us, request bounce back this call");
$this->agi->setVariable("_BOUNCEME", "yes");
}
}

/**
* @brief Check if the diversion header contains a valid number
*
Expand Down
2 changes: 0 additions & 2 deletions asterisk/agi/src/Agi/Action/ExternalDdiCallAction.php
Expand Up @@ -72,8 +72,6 @@ public function process()
$this->checkDiversionNumber($company, $number);
// Check if DDI has recordings enabled
$this->checkDDIRecording($ddi);
// Check if DDI belong to platform
$this->checkDDIBounced($number);

// Call the PSJIP endpoint
$this->agi->setVariable("DIAL_DST", "PJSIP/" . $number . '@proxytrunks');
Expand Down
3 changes: 0 additions & 3 deletions asterisk/agi/src/Agi/Action/ExternalFaxCallAction.php
Expand Up @@ -99,9 +99,6 @@ public function process()
return;
}

// Check if DDI belong to platform
$this->checkDDIBounced($number);

// Set Caller name
$this->agi->setCallerIDNum($ddi->getDdie164());

Expand Down
3 changes: 0 additions & 3 deletions asterisk/agi/src/Agi/Action/ExternalFriendCallAction.php
Expand Up @@ -150,9 +150,6 @@ public function process()
// Check if DDI has recordings enabled
$this->checkDDIRecording($ddi);

// Check if DDI belong to platform
$this->checkDDIBounced($number);

// Call the PSJIP endpoint
$this->agi->setVariable("DIAL_DST", "PJSIP/" . $number . '@proxytrunks');
$this->agi->setVariable("DIAL_OPTS", "");
Expand Down
2 changes: 0 additions & 2 deletions asterisk/agi/src/Agi/Action/ExternalRetailCallAction.php
Expand Up @@ -89,8 +89,6 @@ public function process()

// Check if DDI has recordings enabled
$this->checkDDIRecording($ddi);
// Check if DDI belong to platform
$this->checkDDIBounced($number);

// Call the PSJIP endpoint
$this->agi->setVariable("DIAL_DST", "PJSIP/" . $number . '@proxytrunks');
Expand Down
2 changes: 0 additions & 2 deletions asterisk/agi/src/Agi/Action/ExternalUserCallAction.php
Expand Up @@ -111,8 +111,6 @@ public function process()
$this->checkDiversionNumber($company, $number);
// Check if DDI has recordings enabled
$this->checkDDIRecording($ddi);
// Check if DDI belong to platform
$this->checkDDIBounced($number);

// We need Outgoing DDI for external call presentation
if (!$ddi) {
Expand Down
5 changes: 5 additions & 0 deletions asterisk/agi/src/Agi/ChannelInfo.php
Expand Up @@ -136,6 +136,11 @@ public function getChannelOrigin()
public function getChannelData($datatype)
{
$data = $this->agi->getVariable("${datatype}");

if (empty($data)) {
return null;
}

list ($type, $id) = explode('#', $data);

switch ($type) {
Expand Down
29 changes: 5 additions & 24 deletions asterisk/agi/src/Dialplan/Headers.php
Expand Up @@ -58,7 +58,7 @@ public function process()
$this->agi->setSIPHeader("X-Call-Id", $this->agi->getVariable("CALL_ID"));
$this->agi->setSIPHeader("X-Info-BrandId", $company->getBrand()->getId());
$this->agi->setSIPHeader("X-Info-CompanyId", $company->getId());
$this->agi->setSIPHeader("X-Info-MediaRelaySet", $company->getMediaRelaySets()->getId());
$this->agi->setSIPHeader("X-Info-Type", $company->getType());

// Get Calle data, take if from called endpoint
$endpoint = $this->endpointResolver->getEndpointFromName($this->agi->getEndpoint());
Expand All @@ -68,55 +68,36 @@ public function process()
/** @var UserInterface $user */
$user = $terminal->getUser();
$this->agi->setSIPHeader("X-Info-Callee", $user->getExtensionNumber());
$this->agi->setSIPHeader("X-Info-UserMaxCalls", $user->getMaxCalls());
}
$friend = $endpoint->getFriend();
if (!is_null($friend)) {
$exten = $this->agi->getExtension();
$this->agi->setSIPHeader("X-Info-Callee", $exten);
$this->agi->setSIPHeader("X-Info-Friend", $friend->getRequestURI($exten));
$this->agi->setSIPHeader("X-Info-UserMaxCalls", 0);
$this->agi->setSIPHeader("X-Info-Callee", $this->agi->getExtension());
$this->agi->setSIPHeader("X-Info-Location", $friend->getRequestURI($exten));
}
$retail = $endpoint->getRetailAccount();
if (!is_null($retail)) {
$exten = $this->agi->getExtension();
$this->agi->setSIPHeader("X-Info-Callee", $exten);
$this->agi->setSIPHeader("X-Info-Retail", $retail->getRequestURI($exten));
$this->agi->setSIPHeader("X-Info-UserMaxCalls", 0);
$this->agi->setSIPHeader("X-Info-Callee", $this->agi->getExtension());
$this->agi->setSIPHeader("X-Info-Location", $retail->getRequestURI($exten));

}

// Set on-demand recording header (only for proxyusers)
if ($company->getOnDemandRecord()) {
$this->agi->setSIPHeader("X-Info-RecordCode", $company->getOnDemandRecordCode());
$this->agi->setVariable("FEATUREMAP(automixmon)", $company->getOnDemandRecordDTMFs());
}

} else {
$this->agi->setSIPHeader("X-Info-CompanyDomain", $company->getDomain()->getDomain());
$this->agi->setSIPHeader("X-Info-BillingMethod", $company->getBillingMethod());

// Set special headers for Fax outgoing calls
if ($this->agi->getVariable("FAXFILE_ID")) {
$this->agi->setSIPHeader("X-Info-Special", "fax");
}
}

// Set Special header for Forwarding
if ($this->agi->getRedirecting('from-tag')) {
$this->agi->setSIPHeader("X-Info-ForwardExt", $this->agi->getRedirecting('from-tag'));
}

// Set recording header
if ($this->agi->getVariable("RECORD")) {
$this->agi->setSIPHeader("X-Info-Record", $this->agi->getVariable("RECORD"));
}

// Request intra DDI bounce
if ($this->agi->getVariable("BOUNCEME")) {
$this->agi->setSIPHeader("X-Info-BounceMe", $this->agi->getVariable("BOUNCEME"));
}

// Set pickups group on outgoing channels
if ($this->agi->getVariable("CHANNEL(namedpickupgroup)")) {
$this->agi->setVariable("CHANNEL(namedcallgroup)", $this->agi->getVariable("CHANNEL(namedpickupgroup)"));
Expand Down
19 changes: 0 additions & 19 deletions asterisk/config/dialplan/bouncer.conf

This file was deleted.

6 changes: 0 additions & 6 deletions asterisk/config/dialplan/default.conf
Expand Up @@ -7,8 +7,6 @@
exten => _[+*0-9]!,1,NoOp(Incoming external call from ${CALLERID(all)} to ${EXTEN})
same => n,AGI(agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/trunks)

; Bounced calls for intra DDI calls
include => bouncer
; External Attended tranfers support
include => replacer

Expand All @@ -28,8 +26,6 @@ exten => _[+*0-9]!,1,NoOp(Outgoing call from friend ${CALLERID(all)} to ${EXTEN}
same => n,AGI(agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/friends)
; Playback specific sounds and leave
include => sounds
; Bounced calls for intra DDI calls
include => bouncer
; External Attended tranfers support
include => replacer

Expand All @@ -39,8 +35,6 @@ exten => _[+*0-9]!,1,NoOp(Outgoing call from retail account ${CALLERID(all)} to
same => n,AGI(agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/retailers)
; Playback specific sounds and leave
include => sounds
; Bounced calls for intra DDI calls
include => bouncer

;; Context for calls from queues
[queues]
Expand Down
16 changes: 1 addition & 15 deletions asterisk/config/pjsip.conf
Expand Up @@ -3,7 +3,7 @@
;;
[global]
type=global
user_agent=Irontec IvozProvider v2.2
user_agent=Irontec IvozProvider v2.3
endpoint_identifier_order=contact,ip,username,anonymous

;;
Expand Down Expand Up @@ -44,20 +44,6 @@ type=identify
endpoint=proxytrunks
match=trunks.ivozprovider.local

[proxybouncer]
type=endpoint
aors=proxytrunks
disallow=all
allow=alaw,g729
direct_media=no
dtmf_mode=rfc4733
send_pai=no
100rel=no
t38_udptl=yes
t38_udptl_ec=redundancy
allow_transfer=no
allow_subscribe=no

;;
;; Replacer endpoint
;; Send/Received Remote attended tranfers
Expand Down
10 changes: 8 additions & 2 deletions debian/changelog
@@ -1,8 +1,14 @@
ivozprovider (2.2~2.2.0) UNRELEASED; urgency=medium
ivozprovider (2.3~2.3.0) UNRELEASED; urgency=medium

* Version bump to 2.3.0

-- Irontec IvozProvider Team <ivozprovider@irontec.com> Thu, 31 May 2018 13:38:52 +0200

ivozprovider (2.2~2.2.0) stable; urgency=medium

* Version bump to 2.2.0

-- Irontec IvozProvider Team <ivozprovider@irontec.com> Wed, 02 May 2018 17:22:51 +0200
-- Irontec IvozProvider Team <ivozprovider@irontec.com> Thu, 31 May 2018 13:38:29 +0200

ivozprovider (2.1~2.1.0) stable; urgency=medium

Expand Down
2 changes: 1 addition & 1 deletion debian/ivozprovider-web-rest.postinst
Expand Up @@ -17,6 +17,6 @@ bin/console cache:clear --no-warmup -q -n
bin/console api:swagger:export > web/swagger.json

# Create jwt certificates
[ ! -e /opt/irontec/ivozprovider/web/rest/var/jwt/private.pem ] && bin/generate_keys --initial
[ ! -e /opt/irontec/ivozprovider/web/rest/var/jwt/private.pem ] && bin/generate-keys --initial

:
2 changes: 0 additions & 2 deletions debian/ivozprovider.config
Expand Up @@ -99,8 +99,6 @@ function configure_finish()
USERS_ADDR=$RET
db_get ivozprovider/trunks_address
TRUNKS_ADDR=$RET
db_get ivozprovider/mysql_passowrd
MYSQL_PASS=$RET

if [ -z "$USERS_ADDR" ] || [ -z "$TRUNKS_ADDR" ]; then
db_input high ivozprovider/incomplete_config
Expand Down
9 changes: 6 additions & 3 deletions doc/dev/en/commits.md
Expand Up @@ -11,14 +11,17 @@ 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)
- portals: Changes for web, portals klears, and so on
- 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
- agi: Changes that affect logic of PBX
- agis: Changes that affect logic of PBX
- scheme: Changes that only affect database tables structures
- mappers: Changes in mappers or models (p.e.: regeneration)
- 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
Expand Down

0 comments on commit 8f957fc

Please sign in to comment.