Skip to content

Commit

Permalink
Merge commit for 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danigargar committed Sep 16, 2024
2 parents 83ffdec + ea25193 commit b5628ac
Show file tree
Hide file tree
Showing 601 changed files with 81,038 additions and 36,561 deletions.
15 changes: 0 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,3 @@ web/portal/client/.history

doc/html/*
doc/doctrees/

kamailio/users/config/kamailio-selfsigned.key
kamailio/trunks/config/kamailio-selfsigned.key

kamailio/users/config/listeners.cfg
kamailio/trunks/config/listeners.cfg

kamailio/users/config/pushservers.cfg
kamailio/users/config/geoip.cfg
kamailio/users/config/multisocket.cfg
kamailio/users/config/apiban.cfg
kamailio/users/config/siptrace.cfg
kamailio/trunks/config/custom_settings.cfg
kamailio/trunks/config/apiban.cfg
kamailio/trunks/config/siptrace.cfg
39 changes: 39 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
Fri, 13 Sep 2024 09:17:20 +0200 IvozProvider Team <[email protected]>

* IvozProvider 4.2.0 released

* Portals:
- Fixed a bug that forced portal language to english #2706
- Fixed a bug that prevented image preview in edit screens #2744
- Fixed a bug while filtering dates with zero seconds #2757
- Inactive administrators can now have empty password #2741
- Client: Calendar Periods are now known as Special Schedules #2705
- Client: fixed Holiday dates importer for Calendars #2729
- User: fixed gs wave QR code not being displayed #2703
- User: added a new section to display on-demand user recordings #2725

* Microservices:
- Recordings: fixed a bug that prevented recordings on call-ids with special characters #2708
- Recorgings: added DDI or User that caused the recording to start #2713

* Proxies:
- kamailio: restore support for standalone installs with one single IP address #2748

* Application Server:
- Fixed a bug that prevented on-demand recordings on incoming external calls #2716
- Fixed a bug that prevented on-demand recordings on simple huntgroups #2759
- Fixed a bug while processing outgoing faxes #2723
- Fixed a bug generating BLF hints with unused terminals data #2755
- Reorder how endpoints are identified to support single IP address environments #2756

* Schema:
- CDRs: StartTime fields are now mandatory for UserCdrs and BillableCalls #2739

* Other:
- Added Cypress tests in platform, brand, client and user portals

* Security:
- build(deps): bump braces from 3.0.2 to 3.0.3 in /web/portal #2682
- build(deps): bump axios from 0.21.4 to 0.28.0 in /web/portal #2734
- build(deps): bump micromatch from 4.0.5 to 4.0.8 in /web/portal #2737

Thu, 27 Jun 2024 13:00:34 +0200 IvozProvider Team <[email protected]>

* IvozProvider 4.1.0 released
Expand Down
292 changes: 194 additions & 98 deletions Jenkinsfile

Large diffs are not rendered by default.

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](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) | |
| testing (tempest 4.2.0) | [![iso http](doc/images/iso-http-green.png)](https://packages.irontec.com/isos/ivozprovider-4.2~4.2.0-tempest-amd64.iso) | |


You can read about differences between releases [here](https:/irontec/ivozprovider/blob/bleeding/FAQ.md#what-release-should-i-use).
Expand Down
5 changes: 5 additions & 0 deletions asterisk/agi/src/Agi/Action/HuntGroupCallAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public function process()
$options .= "c";
}

// For record asterisk builtin feature code (FIXME Dont use both X's)
if ($huntGroup->getCompany()->getOnDemandRecord() == 2) {
$options .= "xX";
}

// Call the PSJIP endpoint
$this->agi->setVariable("DIAL_DST", $endpointName);
$this->agi->setVariable("DIAL_TIMEOUT", $timeout);
Expand Down
6 changes: 1 addition & 5 deletions asterisk/agi/src/Dialplan/Trunks.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,10 @@ public function process()
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("__ONDEMANDCODE", $company->getOnDemandRecordDTMFs());
$this->agi->setVariable("CHANNEL(musicclass)", $company->getMusicClass());
$this->agi->setVariable("CHANNEL(language)", $ddi->getLanguageCode());

// Check company On demand record code
if ($company->getOnDemandRecord()) {
$this->agi->setVariable("FEATUREMAP(automixmon)", $company->getOnDemandRecordDTMFs());
}

// Set DDI as the caller
$this->channelInfo->setChannelCaller(new DdiAgent($this->agi, $ddi));

Expand Down
2 changes: 1 addition & 1 deletion asterisk/agi/src/Dialplan/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function process()
$this->agi->setVariable("__COMPANYID", $company->getId());
$this->agi->setVariable("__COMPANYTYPE", $company->getType());
$this->agi->setVariable("__BRANDID", $brand->getId());
$this->agi->setVariable("__ONDEMANDCODE", $company->getOnDemandRecordCode());
$this->agi->setVariable("__ONDEMANDCODE", $company->getOnDemandRecordDTMFs());

// Mark this call as generated from user
$this->agi->setVariable("__CALL_TYPE", "internal");
Expand Down
1 change: 1 addition & 0 deletions asterisk/config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pjsip.conf
2 changes: 1 addition & 1 deletion asterisk/config/dialplan/faxes.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exten => _[+*0-9]!,1,NoOp(Procesing outgoing Fax to ${EXTEN})
;; Context for Calling an external number through a fax
[faxes-call-world]
exten => _[+*0-9]!,1,NoOp(Calling external number)
same => n,Dial(${DIAL_DST},${DIAL_TIMEOUT},${DIAL_OPTS}b(add-headers^${EXTEN}^1))
same => n,Dial(${DIAL_DST},${DIAL_TIMEOUT},${DIAL_OPTS}b(add-headers-trunks^${EXTEN}^1))

exten => h,1,NoOp(Sending faxfile call ended with status ${DIALSTATUS})
same => n,AGI(agi://${FASTAGI_SERVER}/fastagi-runner.php?command=Dialplan/FaxDialStatus)
Expand Down
4 changes: 2 additions & 2 deletions asterisk/config/pjsip.conf → asterisk/config/pjsip.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
;;
[global]
type=global
user_agent=Irontec IvozProvider v4.1
endpoint_identifier_order=ip,header,username,anonymous
user_agent=Irontec IvozProvider v4.2
endpoint_identifier_order=header,ip
mwi_disable_initial_unsolicited=yes

;;
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.1~4.1.0) UNRELEASED; urgency=medium
ivozprovider (4.2~4.2.0) UNRELEASED; urgency=medium

* Version bump to 4.2.0

-- Irontec IvozProvider Team <[email protected]> Thu, 12 Sep 2024 13:45:11 +0200

ivozprovider (4.1~4.1.0) unstable; urgency=medium

* Version bump to 4.1.0

Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Source: ivozprovider
Section: php
Priority: optional
Build-Depends: debhelper (>=9.2),
dh-exec,
composer,
curl,
gettext,
Expand Down
4 changes: 4 additions & 0 deletions debian/ivozprovider-asterisk-config.install
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#!/usr/bin/dh-exec

asterisk/config/* /etc/asterisk/

asterisk/config/pjsip.conf.in => /etc/asterisk/pjsip.conf
2 changes: 0 additions & 2 deletions debian/ivozprovider.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,13 @@ function setup_proxies()
sed -i -e '/#!define SIPS_PORT/c\#!define SIPS_PORT 7061' /etc/kamailio/proxytrunks/kamailio.cfg
sed -i -e '/modparam("dmq", "server_address"/c\modparam("dmq", "server_address", "sip:trunks.ivozprovider.local:7060")' /etc/kamailio/proxytrunks/kamailio.cfg
sed -i -e '/contact=sip:trunks.ivozprovider.local/c\contact=sip:trunks.ivozprovider.local:7060' /etc/asterisk/pjsip.conf
sed -i -e '/endpoint_identifier_order=ip,contact,username,anonymous/c\endpoint_identifier_order=contact,ip,username,anonymous' /etc/asterisk/pjsip.conf
else
sed -i -e '/#!define TRUNKS_SIP_PORT/c\#!define TRUNKS_SIP_PORT 5060' /etc/kamailio/proxyusers/kamailio.cfg
sed -i -e '/modparam("dmq", "notification_address"/c\modparam("dmq", "notification_address", "sip:trunks.ivozprovider.local:5060")' /etc/kamailio/proxyusers/kamailio.cfg
sed -i -e '/#!define SIP_PORT/c\#!define SIP_PORT 5060' /etc/kamailio/proxytrunks/kamailio.cfg
sed -i -e '/#!define SIPS_PORT/c\#!define SIPS_PORT 5061' /etc/kamailio/proxytrunks/kamailio.cfg
sed -i -e '/modparam("dmq", "server_address"/c\modparam("dmq", "server_address", "sip:trunks.ivozprovider.local:5060")' /etc/kamailio/proxytrunks/kamailio.cfg
sed -i -e '/contact=sip:trunks.ivozprovider.local/c\contact=sip:trunks.ivozprovider.local' /etc/asterisk/pjsip.conf
sed -i -e '/endpoint_identifier_order=contact,ip,username,anonymous/c\endpoint_identifier_order=ip,contact,username,anonymous' /etc/asterisk/pjsip.conf
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ This is how each criteria is evaluated:
Lock criteria
If one of selected route locks is open, this criteria is considered fulfilled.

.. warning:: :ref:`Calendar Periods` linked to selected calendars are not taken into account.
.. warning:: :ref:`Special Schedules` linked to selected calendars are not taken into account.

DDI routed to a conditional route
=================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ days will be holidays using the buttons in its row:
is called *Import from CSV*.
Also a range of dates may be added with *Add Holiday date range* menu option.

.. _calendar periods:
.. _special schedules:

Calendar Periods
----------------
Special schedules
-----------------

Calendars can also be used to override some time periods with a different schedule.
This can be handy if vPBX has a summer schedule or other types of schedule based events.

Calendar periods can define a custom Scheduler and override External Call filters configurations:
Special schedules can define a custom Scheduler and override External Call filters configurations:

Start Date
Since when the schedules will override the filters configuration
Expand All @@ -73,8 +73,8 @@ Calendar periods can define a custom Scheduler and override External Call filter
Route options
Override default external call filter Out of schedule options

Difference between non-whole day event and calendar period
----------------------------------------------------------
Difference between non-whole day event and special schedules
------------------------------------------------------------

In order to understand the difference between these two features it is important to know the order of call filter logic:

Expand All @@ -88,10 +88,10 @@ This is where non-whole day event applies, making the answer to the question abo

**2. Is current time marked as out-of-schedule?**

This is where calendar period applies, overriding schedules of External Call Filter with the one defined in calendar
This is where special schedules applies, overriding schedules of External Call Filter with the one defined in calendar
period.

- Yes: apply out-of-schedule logic defined in the calendar period or in External Call Filter.
- Yes: apply out-of-schedule logic defined in the special schedules or in External Call Filter.

- No: proceed with standard logic.

Expand All @@ -101,17 +101,17 @@ Configuration of a given day:

- Non-whole day event: 8:00-15:00

- Calendar period: 13:00-17:00
- Special schedule: 13:00-17:00

Cases:

- Call at 7:00: out of schedule due to calendar period.
- Call at 7:00: out of schedule due to special schedule.

- Call at 9:00: holiday logic due to non-whole day event.

- Call at 14:00: holiday logic due to non-whole day event.

- Call at 16:00: normal logic.

- Call at 18:00: out of schedule due to calendar period.
- Call at 18:00: out of schedule due to special schedule.

2 changes: 1 addition & 1 deletion doc/sphinx/basic_concepts/installation/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ For a StandAlone installation, we recommend at least:

If you're not using a :ref:`Automatic ISO CD image` you will also need:

* Debian Bullseye 11.0 base install
* Debian Bookworm 12.0 base install
* Internet access

4 changes: 2 additions & 2 deletions doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# built documents.
#
# The short X.Y version.
version = "4.1"
version = "4.2"

# The full version, including alpha/beta/rc tags.
release = 'tempest'
Expand Down Expand Up @@ -277,7 +277,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'IvozProvider.tex', 'IvozProvider 4.1 Documentation',
(master_doc, 'IvozProvider.tex', 'IvozProvider 4.2 Documentation',
'Irontec', 'manual'),
]

Expand Down
13 changes: 11 additions & 2 deletions kamailio/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
*.crt
*.key
apiban.cfg
custom-defines.cfg
custom-global-params.cfg
*.key
*.crt
custom_settings.cfg
geoip.cfg
listeners.cfg
multisocket.cfg
ports.cfg
ports.cfg.dev
pushservers.cfg
siptrace.cfg
36 changes: 23 additions & 13 deletions kamailio/trunks/config/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

####### Defines #########

#!define SIP_PORT 5060
#!define SIPS_PORT 5061
#!define RPC_PORT 8001
#!define XMLRPC_PORT 8002
include_file "ports.cfg"

# - flags
# FLT_ - per transaction (message) flags
Expand Down Expand Up @@ -133,8 +130,8 @@ log_facility=LOG_LOCAL0
onsend_route_reply=yes

# Add custom Server header
server_header="Server: Irontec IvozProvider v4.1"
user_agent_header="User-Agent: Irontec IvozProvider v4.1"
server_header="Server: Irontec IvozProvider v4.2"
user_agent_header="User-Agent: Irontec IvozProvider v4.2"

####### Modules Section ########

Expand Down Expand Up @@ -201,8 +198,8 @@ modparam("ndb_redis", "init_without_redis", 1)
#!endif

# DMQ
modparam("dmq", "server_address", "sip:trunks.ivozprovider.local:5060")
modparam("dmq", "notification_address", "sip:users.ivozprovider.local:5060")
modparam("dmq", "server_address", TRUNKS_DMQ_SERVER)
modparam("dmq", "notification_address", USERS_DMQ_SERVER)
modparam("dmq", "ping_interval", 3600)

# HTTP_CLIENT
Expand Down Expand Up @@ -1590,7 +1587,7 @@ route[WITHINDLG] {
route[DISPATCH] {
if ($Ri != $var(trunksAddress)) {
# force_send_socket to main address
$fs = "udp:" + $var(trunksAddress) + ":5060";
$fs = "udp:" + $var(trunksAddress) + ":" + SIP_PORT;
}

if ($dlg_var(type) == 'retail') {
Expand Down Expand Up @@ -2109,7 +2106,7 @@ failure_route[MANAGE_FAILURE_AS] {
xinfo("[$dlg_var(cidhash)] MANAGE-FAILURE-AS: going to <$ru> via <$du>\n");

# Reset force_socket again
$fs = "udp:" + $var(trunksAddress) + ":5060";
$fs = "udp:" + $var(trunksAddress) + ":" + SIP_PORT;

t_on_failure("MANAGE_FAILURE_AS");
route(RELAY);
Expand Down Expand Up @@ -2215,6 +2212,19 @@ event_route[tm:local-request] {
$ru = $dlg_var(contact);
}
}

# REGISTER: fix Contact and socket port if wrong (for mono-IP environments)
if (is_method("REGISTER") && SIP_PORT != 5060) {
$var(contactUsername) = $(ct{s.rm,<}{s.rm,>}{uri.user}); # Extract Contact Username

sql_xquery("cb", "SELECT socket FROM kam_trunks_uacreg WHERE l_uuid='$var(contactUsername)'", "uacreg");
if ($xavp(uacreg=>socket) != $null && $(xavp(uacreg=>socket){s.len}) > 0) {
$var(socketIP) = $(xavp(uacreg=>socket){s.select,1,:});
$fs = "udp:" + $var(socketIP) + ":" + SIP_PORT;
}

subst_hf("Contact", "/:5060/:" + SIP_PORT + "/", "a");
}
}

onsend_route {
Expand Down Expand Up @@ -2424,13 +2434,13 @@ route[IS_WITHIN_COUNTRY] {
route[FORCE_CARRIER_SOCKET] {
if ($var(carrierSocketTransport) == '2') {
$avp(carrierSocketTransport) = 'tcp';
$avp(carrierSocketPort) = '5060';
$avp(carrierSocketPort) = SIP_PORT;
} else if ($var(carrierSocketTransport) == '3') {
$avp(carrierSocketTransport) = 'tls';
$avp(carrierSocketPort) = '5061';
$avp(carrierSocketPort) = SIPS_PORT;
} else {
$avp(carrierSocketTransport) = 'udp';
$avp(carrierSocketPort) = '5060';
$avp(carrierSocketPort) = SIP_PORT;
}

$fs = $avp(carrierSocketTransport) + ":" + $avp(carrierSocketIp) + ":" + $avp(carrierSocketPort);
Expand Down
Loading

0 comments on commit b5628ac

Please sign in to comment.