Commit Graph

31011 Commits

Author SHA1 Message Date
Rodrigo Ramírez Norambuena
5c87fa6a0e README.md: Update year
Change-Id: I746fb94d112c7d797e206bca0fd1e13fcd26bae3
2019-07-19 07:45:17 -06:00
George Joseph
284b657539 Merge "Build: Add separate header install/uninstall targets" into 13 2019-07-19 07:34:39 -05:00
Friendly Automation
976f884a24 Merge "manager: Log AMI actions" into 13 2019-07-19 07:25:10 -05:00
Asterisk Development Team
b3d0754f82 Update CHANGES and UPGRADE.txt for 13.28.0 2019-07-18 06:05:29 -05:00
George Joseph
aaafe8a108 Build: Add separate header install/uninstall targets
Two new Makefile targets have been added... "install-headers" and
"uninstall-headers" to separately control header installation.
The existing behavior has not changed so "make install" and
"make uninstall" will continue to also install/uninstall the headers.
The new targets were added for forward compatibility with Asterisk 17
in which the headers are no longer installed/uninstalled with the
"install" and "uninstall" targets.

Also corrects an issue where /usr/include/asterisk.h was never
being removed at all.

Change-Id: Ia7399f3a0203a4825fc4a9f43b9034dae9a2b643
2019-07-16 08:16:38 -06:00
Kevin Harwell
d2eaba4853 manager: Log AMI actions
When manager debugging is turned on, this patch makes it so incoming AMI actions
are now also logged.

Change-Id: I8047524510e7ac97d99482b2448f8e368f29cd47
2019-07-15 10:10:46 -06:00
Joshua Colp
3cb839d111 res_rtp_asterisk: Move where DTLS MTU variable is defined.
The DTLS MTU variable is not dependent on pjproject and should
not exist in its block.

Change-Id: I7e97d64dc192f2ac81bfe2b72b8229d321c7d026
2019-07-14 15:26:41 -03:00
Friendly Automation
a7bb02ae34 Merge "res_pjsip_messaging: Check for body in in-dialog message" into 13 2019-07-11 15:10:42 -05:00
George Joseph
41d6492de0 res_pjsip_messaging: Check for body in in-dialog message
We now check that a body exists and it has a length > 0 before
attempting to process it.

ASTERISK-28447
Reported-by: Gil Richard

Change-Id: Ic469544b22ab848734636588d4c93426cc6f4b1f
2019-07-11 11:31:08 -05:00
Francesco Castellano
1318a3a2b7 chan_sip: Handle invalid SDP answer to T.38 re-invite
The chan_sip module performs a T.38 re-invite using a single media
stream of udptl, and expects the SDP answer to be the same.

If an SDP answer is received instead that contains an additional
media stream with no joint codec a crash will occur as the code
assumes that at least one joint codec will exist in this
scenario.

This change removes this assumption.

ASTERISK-28465

Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
2019-07-11 11:28:03 -05:00
Chris-Savinovich
e206a54d59 chan_dahdi.c: crash in chan_dahdi
Fixes a crash in chan_dahdi occurring on 32-bit systems. A previous
patch introduced a variable of type unassigned long long which is 64-bits.
Casting it as 'ast_json_int_t' along with JSON type 'I' makes it work
with 32-bit systems.

ASTERISK-28457

Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
2019-07-01 17:04:47 -05:00
George Joseph
72f001d558 Merge "pjproject_bundled: Add peer information to most SSL/TLS errors" into 13 2019-07-01 10:19:17 -05:00
Friendly Automation
6ac6218f73 Merge "tcptls.c: Add peer hostname and port to some error messages" into 13 2019-07-01 10:04:30 -05:00
Kevin Harwell
8ef52e8a19 Merge "pjproject: Update to 2.9 release" into 13 2019-06-27 16:52:35 -05:00
George Joseph
be54e94773 tcptls.c: Add peer hostname and port to some error messages
Where possble, hostname and port has been added to error
messages, mostly on the server side.

ASTERISK-26006
Reported by: Oleksandr Natalenko

Change-Id: Iff4f897277bc36ce8c5b493b71d0a4a7b74e62f0
2019-06-27 14:04:27 -06:00
George Joseph
493268a938 pjproject_bundled: Add peer information to most SSL/TLS errors
Most SSL/TLS error messages coming from pjproject now have either
the peer address:port or peer hostname, depending on what was
available at the time and code location where the error was
generated.

ASTERISK-28444
Reported by: Bernhard Schmidt

Change-Id: I41770e8a1ea5e96f6e16b236692c4269ce1ba91e
2019-06-27 11:46:44 -06:00
Kevin Harwell
a302d46dd8 Merge "app_amd: issue with silence suppression fixed" into 13 2019-06-27 11:33:37 -05:00
Sean Bright
ba57b004c4 pjproject: Update to 2.9 release
Relies on https://github.com/asterisk/third-party/pull/4

Change-Id: Iec9cad42cb4ae109a86a3d4dae61e8bce4424ce3
2019-06-27 10:10:24 -06:00
George Joseph
94e0e26c2a Merge "CI: New way to determnine libdir" into 13 2019-06-25 09:07:49 -05:00
George Joseph
44e65b92c1 Merge "sig_pri: Address gcc9 issues" into 13 2019-06-25 09:06:18 -05:00
George Joseph
dd20beedb9 Merge "res_pjsip_sdp_rtp: Fix ICE candidates leak." into 13 2019-06-25 09:05:38 -05:00
George Joseph
e39dbc4909 Merge "res_fax: gateway sends T.38 request to both endpoints if V.21 detected" into 13 2019-06-24 15:16:43 -05:00
George Joseph
79087b6aeb sig_pri: Address gcc9 issues
A few more format truncation issues addressed.

Change-Id: I047f373169caaca0eec4889d3c0e5e10f130017a
2019-06-24 07:30:19 -06:00
Joshua Colp
9721f3908d res_pjsip_sdp_rtp: Fix ICE candidates leak.
Given the non-default configuration of enabling ICE support on an
endpoint that does not result in an ICE negotiation occurring the
ICE candidates would be leaked.

This change makes it so that the ICE candidates are only retrieved
if ICE negotiation is occurring.

ASTERISK-28460

Change-Id: I7b3f76f031c41fb8a3dc3ef1a84b77e2a8cb969f
2019-06-24 10:08:06 +00:00
George Joseph
f22dedc597 Merge "app_confbridge: Attended transfer event fixup" into 13 2019-06-21 13:41:40 -05:00
George Joseph
5d45686c28 Merge "translate.c do not log WARNING on empty audio frame" into 13 2019-06-21 10:52:13 -05:00
Alexei Gradinari
d5db7473e7 res_fax: gateway sends T.38 request to both endpoints if V.21 detected
According T.38 Gateway 'Use case 3'
https://wiki.asterisk.org/wiki/display/AST/T.38+Gateway
T.38 Gateway should send T.38 negotiation request to called endpoint
if FAX preamble (using V.21 detector) generated by called endpoint.
But it does not, because fax_gateway_detect_v21 constructs T.38
negotiation request, but forwards it only to other channel,
not to the channel on which FAX preamble is detected.

Some SIP endpoints could be improperly configured to rely on the other side
to initiate T.38 re-INVITEs.

With this patch the T.38 Gateway tries to negotiate with both sides
by sending T.38 negotiation request to both endpoints supported T.38.

Change-Id: I73bb24799bfe1a48adae9c034a2edbae54cc2a39
2019-06-20 16:57:33 -06:00
George Joseph
e4ee209bfe CI: New way to determnine libdir
We were using the presence of /usr/lib64 to determine where
shared libraries should be installed.  This only existed on
Redhat based systems and was safe.  If it existed, use it,
otherwise use /usr/lib.

Unfortunately, Ubuntu 19 decided to create a /usr/lib64 BUT
NOT INCLUDE IT IN THE DEFAULT ld.so.conf.  So if anything is
installed there, it won't work.

The new method, just looks for $ID in /etc/os-release and if it's
centos or fedora, uses /usr/lib64 and if ubuntu, uses /usr/lib.

NOTE:  This applies only to the CI scripts.  Normal asterisk
build and install is not affected.

Change-Id: Iad66374b550fd89349bedbbf2b93f8edd195a7c3
2019-06-19 10:58:39 -06:00
Alexei Gradinari
3bfe1f3a1b translate.c do not log WARNING on empty audio frame
There is WARNING "no samples for ..." on each Playtones.
The function ast_playtones_start calls ast_activate_generator,
which calls ast_prod.
The function ast_prod calls ast_write with empty audio frame.
In this case it's spam log.

Change-Id: Id4ac309489d9ff281bad02abdef341cecdede660
2019-06-18 10:40:57 -06:00
George Joseph
d0f01af913 chan_dahdi: Address gcc9 issues
Fixed format-truncation issues in chan_dahdi.c and
sig_analog.c.  Since they're related to fields provided
by dahdi-tools we can't change the buffer sizes so we're just
checking the return from snprintf and printing an errior if we
overflow.

Change-Id: Idc1f3c1565b88a7d145332a0196074b5832864e5
2019-06-17 12:51:55 -06:00
Joshua Colp
d5fed38ab5 Merge "res_rtp_asterisk: Add support for DTLS packet fragmentation." into 13 2019-06-17 08:39:11 -05:00
George Joseph
41f5d15763 app_confbridge: Attended transfer event fixup
When a channel already in a conference bridge is attended transfered
to another extension, or when an existing call is attended
transferred into a conference bridge, we now generate ConfbridgeJoin
and ConfbridgeLeave events for the entering and departing channels.

Change-Id: Id7709cfbceb26fbcb828b2d0d2a6b2fbeaf028e1
2019-06-13 14:05:12 -06:00
Joshua Colp
1ea9bad34d res_rtp_asterisk: Add support for DTLS packet fragmentation.
This change adds support for larger TLS certificates by allowing
OpenSSL to fragment the DTLS packets according to the configured
MTU. By default this is set to 1200.

This is accomplished by implementing our own BIO method that
supports MTU querying. The configured MTU is returned to OpenSSL
which fragments the packet accordingly. When a packet is to be
sent it is done directly out the RTP instance.

ASTERISK-28018

Change-Id: If2d5032019a28ffd48f43e9e93ed71dbdbf39c06
2019-06-13 13:49:07 +00:00
George Joseph
83c353c650 Merge "app_attended_transfer: new application AttendedTransfer" into 13 2019-06-12 10:44:36 -05:00
George Joseph
dd4f0c94e8 Merge "app_blind_transfer: new application BlindTransfer" into 13 2019-06-12 10:42:57 -05:00
George Joseph
0e30d17293 Merge "chan_pjsip.c: Check for channel and session to not be NULL in hangup" into 13 2019-06-12 08:49:51 -05:00
Alexei Gradinari
45a9ee4c53 app_attended_transfer: new application AttendedTransfer
AttendedTransfer queues up attended transfer to the given extension.

This application can be useful with Custom Dynamic Features.
For example to make attended transfer to a predefined number.

features.conf
;;;
[applicationmap]
my_atxfer => *7,self,GoSub,"my_atxfer,s,1",default
;;;

extensions.conf
;;;
[globals]
DYNAMIC_FEATURES=my_atxfer
TRANSFER_CONTEXT=my_transfer

[my_atxfer]
exten => s,1,AttendedTransfer(1234567890)
   same => n,Return()

[my_transfer]
include => default
;;;

This application also can be used to completly redefine Attended transfer
feature using dialplan. For example:

features.conf
;;;
[featuremap]
atxfer => *7

[applicationmap]
custom_atxfer => *2,self,GoSub,"custom_atxfer,s,1",default
;;;

extensions.conf
;;;
[globals]
DYNAMIC_FEATURES=custom_atxfer
TRANSFER_CONTEXT=my_transfer

[custom_atxfer]
exten => s,1,
   same => n,Playback(pbx-transfer)
   same => n,Read(dest,dial,10,i,3,3)
   same => n,AttendedTransfer(${dest})
   same => n,Return()

[my_transfer]
include => default
;;;

Change-Id: Ie5cfa455d0813cffd5c85a6fb117f07d8f0b903b
2019-06-11 08:16:52 -06:00
agupta
67841b8f55 chan_pjsip.c: Check for channel and session to not be NULL in hangup
We have seen some rare case of segmentation fault in hangup function
and we could notice that channel pointer was NULL.  Debug log shows
that there is a 200 OK answer and SIP timeout at the same time.  It
looks that while the SIP session was being destroyed due to timeout
call hangup due to answer event lead to race condition and channel
is being destroyed from two different places.  The check ensures we
check it not to be NULL before freeing it.

ASTERISK-25371

Change-Id: I19f6566830640625e08f7b87bfe15758ad33a778
2019-06-10 06:47:24 -06:00
Alexei Gradinari
dd12e1cbd3 app_blind_transfer: new application BlindTransfer
BlindTransfer redirects all channels currently bridged to the
caller channel to the specified destination.

This application can be useful with Custom Dynamic Features.
For example to make blind transfer to a predefined number.

features.conf
;;;
[applicationmap]
my_blindxfer => *6,self,GoSub,"my_blindxfer,s,1",default
;;;

extensions.conf
;;;
[globals]
DYNAMIC_FEATURES=my_blindxfer

[my_blindxfer]
exten => s,1,BlindTransfer(1234567890,default)
   same => n,Return()
;;;

This application also can be used to completly redefine Blind transfer
feature using dialplan. For example:

features.conf
;;;
[featuremap]
blindxfer =>

[applicationmap]
custom_blindxfer => ##,self,GoSub,"custom_blindxfer,s,1",default
;;;

extensions.conf
;;;
[globals]
DYNAMIC_FEATURES=custom_blindxfer

[custom_blindxfer]
exten => s,1,
   same => n,Playback(pbx-transfer)
   same => n,Read(dest,dial,10,i,3,3)
   same => n,BlindTransfer(${dest},default)
   same => n,Return()
;;;

Change-Id: I9d55e7f69ccfd4472dec00d62771d6de8803215a
2019-06-07 08:26:21 -06:00
Chris-Savinovich
45c1159c62 cdr_pgsql: fix error in connection string
Fixes an error occurring in function pgsql_reconnect() caused when value of
hostname is blank. Which in turn will cause the connection string to look
like this: "host= port=xx", which creates a sintax error. This fix now checks
if the corresponding values for host, port, dbname, and user are blank. Note
that since this is a reconnect function the database library will replace any
missing value pairs with default ones.

ASTERISK-28435

Change-Id: I0a921f99bbd265768be08cd492f04b30855b8423
2019-06-04 12:38:19 -06:00
Joshua Colp
1c665ae39b Merge "res_fax: fix segfault on inactive "reserved" fax session" into 13 2019-06-04 05:29:07 -05:00
Friendly Automation
6df25921ca Merge "app_readexten: new option 'p' to stop reading on '#' key" into 13 2019-06-03 09:54:45 -05:00
Friendly Automation
066ff4d3a8 Merge "res_fax: add channel name to CLI 'fax show session'" into 13 2019-06-03 09:34:59 -05:00
Friendly Automation
e4d91ab4b2 Merge "pjsip: replace 180 by 183 if SDP negotiation has completed" into 13 2019-06-03 08:52:49 -05:00
Alexei Gradinari
e306c62ff1 res_fax: fix segfault on inactive "reserved" fax session
The change #10017 "Handle fax gateway being started more than once"
introdiced a bug which leads to segfault in res_fax_spandsp.

The res_fax_spandsp module does not support reserving sessions, so
fax_session_reserve returns a fax session with state AST_FAX_STATE_INACTIVE.

The fax_gateway_start does not create a real fax session if the fax session
is already present and the state is not AST_FAX_STATE_RESERVED.
But the "reserved" session created for res_fax_spandsp has state
AST_FAX_STATE_INACTIVE, so fax_gateway_start not starting.

Then when fax_gateway_framehook is called and gateway T.38 state is
NEGOTIATED the call of gateway->s->tech->write(gateway->s, f) leads to
segfault, because session tech_pvt is not set, i.e. the tech session
was not initialized/started.

This patch adds check also on AST_FAX_STATE_INACTIVE to the "reserved"
session created for res_fax_spandsp will start.

This patch also adds extra check and log ERROR if tech_pvt is not set
before call tech->write.

ASTERISK-27981 #close

Change-Id: Ife3e65e5f18c902db2ff0538fccf7d28f88fa803
2019-06-03 07:30:07 -06:00
Asterisk Development Team
fba341af8b Update CHANGES and UPGRADE.txt for 13.27.0 2019-05-30 11:59:20 -05:00
Friendly Automation
7dd93bfe9a Merge "build: Fix file format in CHANGES-staging." into 13 2019-05-30 05:17:46 -05:00
Nasir Iqbal
f7527921b6 app_amd: issue with silence suppression fixed
Now AMD algorithm will not ignore AST_FRAME_NULL, As I think using manual
wait time instead of `framelength` is enough to fix timeout / TOOLONG issue.

ASTERISK-28419 #close

Change-Id: I16ea2d6295bc99b975e8c092e5f9fbd9214debdb
2019-05-30 09:56:03 +00:00
Alexei Gradinari
dfa513c565 res_fax: add channel name to CLI 'fax show session'
This patch adds a channel name to output of CLI 'fax show session'
and also expands the channel name field up to 30 characters on
CLI 'fax show sessions'

Change-Id: Id059c43ff41811f5e76712b83fb63b8f246da953
2019-05-29 11:13:33 -06:00
Ben Ford
6aeab9d5e7 build: Fix file format in CHANGES-staging.
One of the change files doesn't conform to the format that the release
scripts need in order to parse it.

Change-Id: Ie0b634cf27e4cbc671b9fe92993b6f2ecf60254c
2019-05-24 09:01:14 -05:00