Commit Graph

32114 Commits

Author SHA1 Message Date
George Joseph
31ef22ead1 Merge "tcptls.c: Add peer hostname and port to some error messages" into 16 2019-07-01 10:19:50 -05:00
George Joseph
205a255b27 Merge "pjproject_bundled: Add peer information to most SSL/TLS errors" into 16 2019-07-01 10:18:52 -05:00
Kevin Harwell
323b1e5fe5 Merge "pjproject: Update to 2.9 release" into 16 2019-06-27 16:52:50 -05:00
George Joseph
0dc61e41fa 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 15:04:20 -06:00
George Joseph
2db5173b88 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 12:52:48 -05:00
Kevin Harwell
d2a696cc04 Merge "app_amd: issue with silence suppression fixed" into 16 2019-06-27 11:33:51 -05:00
George Joseph
7d48e086ca Merge "sig_pri: Address gcc9 issues" into 16 2019-06-25 09:08:09 -05:00
George Joseph
33b3f8b09f Merge "CI: New way to determnine libdir" into 16 2019-06-25 09:06:45 -05:00
Friendly Automation
635affeac5 Merge "res_fax: gateway sends T.38 request to both endpoints if V.21 detected" into 16 2019-06-24 14:11:14 -05:00
George Joseph
31d755e805 sig_pri: Address gcc9 issues
A few more format truncation issues addressed.

Change-Id: I047f373169caaca0eec4889d3c0e5e10f130017a
2019-06-24 07:31:01 -06:00
Friendly Automation
a464847a1b Merge "app_confbridge: Attended transfer event fixup" into 16 2019-06-21 11:24:11 -05:00
Friendly Automation
25c6890864 Merge "translate.c do not log WARNING on empty audio frame" into 16 2019-06-21 10:37:49 -05:00
Nasir Iqbal
52a3d4a761 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-06-20 23:44:08 -06:00
George Joseph
01712bbdc9 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 11:03:35 -06:00
George Joseph
1ee2f01f62 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:58:40 -06:00
Alexei Gradinari
8b77318a2c 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-14 17:06:06 -04:00
George Joseph
ccc92b6ecb 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:06:08 -06:00
Sean Bright
694097ee68 pjproject: Update to 2.9 release
Relies on https://github.com/asterisk/third-party/pull/4

Change-Id: Iec9cad42cb4ae109a86a3d4dae61e8bce4424ce3
2019-06-13 09:16:44 -06:00
Joshua Colp
82789aafd6 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 07:51:39 -06:00
George Joseph
ca462f6e15 Merge "app_attended_transfer: new application AttendedTransfer" into 16 2019-06-12 10:43:46 -05:00
George Joseph
5c2bf122ed Merge "app_blind_transfer: new application BlindTransfer" into 16 2019-06-12 10:43:17 -05:00
George Joseph
da5874ec47 Merge "chan_pjsip.c: Check for channel and session to not be NULL in hangup" into 16 2019-06-12 08:50:14 -05:00
Joshua Colp
5c32680bb7 Merge "cdr_pgsql: fix error in connection string" into 16 2019-06-11 08:03:23 -05:00
George Joseph
e7d0ca1591 Merge "pbx_dundi: added IPv4/IPv6 dual bind support to DUNDi" into 16 2019-06-10 07:37:23 -05:00
agupta
72f26aa8eb 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-06 13:24:04 -06:00
Kirsty Tyerman
a1c84709b8 pbx_dundi: added IPv4/IPv6 dual bind support to DUNDi
ASTERISK-28234
Reported-by: Kirsty Tyerman

Change-Id: I5d6e6b52dbe51415046bb3953fd16f5b421bc2e1
2019-06-05 11:56:22 -06:00
Chris-Savinovich
c2621aa190 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 13:37:34 -05:00
Alexei Gradinari
86cd77ec0a 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-04 13:42:54 -04:00
Alexei Gradinari
6321b559b9 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-04 11:46:16 -04:00
Joshua Colp
de38c9c3b3 Merge "res_fax: fix segfault on inactive "reserved" fax session" into 16 2019-06-04 05:29:39 -05:00
Friendly Automation
eefd53b718 Merge "app_readexten: new option 'p' to stop reading on '#' key" into 16 2019-06-03 09:41:19 -05:00
Friendly Automation
c945d3d9c8 Merge "res_fax: add channel name to CLI 'fax show session'" into 16 2019-06-03 09:33:32 -05:00
Friendly Automation
53df0ff200 Merge "pjsip: replace 180 by 183 if SDP negotiation has completed" into 16 2019-06-03 08:56:48 -05:00
Asterisk Development Team
d2c07aceca Update CHANGES and UPGRADE.txt for 16.4.0 2019-05-30 12:08:23 -05:00
Friendly Automation
7053104222 Merge "build: Fix file format in CHANGES-staging." into 16 2019-05-30 05:22:33 -05:00
Alexei Gradinari
e77704f45c 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-28 18:21:15 -04:00
Alexei Gradinari
e0a574253e 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-05-28 17:10:21 -04:00
Ben Ford
ec74fd56a7 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 08:03:40 -06:00
Guido Falsi
86fb72c4d0 chan_dahdi: add missing include.
After some definitions have been moved to asterisk/mwi.h the files
channels/chan_dahdi.h channels/sig_pri.c are missing this new
include.

ASTERISK-28427 #close

Change-Id: Ia8cc595eeda653324643f40dcd9799d4c3f0ac91
2019-05-23 08:49:11 -06:00
Friendly Automation
0fc6617246 Merge "res_rtp_asterisk: timestamp should be unsigned instead of signed int" into 16 2019-05-23 09:06:17 -05:00
George Joseph
a99f814414 Merge "res_rtp_asterisk: Add ability to propose local address in ICE" into 16 2019-05-22 12:47:17 -05:00
Morten Tryfoss
9351aa3f0e res_rtp_asterisk: timestamp should be unsigned instead of signed int
Using timestamp with signed int will cause timestamps exceeding max value
to be negative.
This causes the jitterbuffer to do passthrough of the packet.

ASTERISK-28421

Change-Id: I9dabd0718180f2978856c50f43aac4e52dc3cde9
2019-05-22 08:46:55 -06:00
Alexei Gradinari
db5bc0fabf 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-05-21 16:02:54 -04:00
Alexei Gradinari
9516fb64c9 app_readexten: new option 'p' to stop reading on '#' key
This patch adds the 'p' option.
The extension entered will be considered complete when a # is entered.

Change-Id: If77c40c9c8b525885730821e768f5dea71cf04c1
2019-05-21 10:29:27 -04:00
Joshua Colp
33ed2e1bb8 pjproject-bundled: Add upstream timer fixes
Fixed #2191:
  - Stricter double timer entry scheduling prevention.
  - Integrate group lock in SIP transport, e.g: for add/dec ref,
    for timer scheduling.

ASTERISK-28161
Reported-by: Ross Beer

Change-Id: I2e09aa66de0dda9414d8a8259a649c4d2d96a9f5
2019-05-20 14:46:38 -03:00
George Joseph
79b15d0b30 res_rtp_asterisk: Add ability to propose local address in ICE
You can now add the "include_local_address" flag to an entry in
rtp.conf "[ice_host_candidates]" to include both the advertized
address and the local address in ICE negotiation:

[ice_host_candidates]
192.168.1.1 = 1.2.3.4,include_local_address

This causes both 192.168.1.1 and 1.2.3.4 to be advertized.

Change-Id: Ide492cd45ce84546175ca7d557de80d9770513db
2019-05-17 17:49:57 -06:00
Joshua Colp
2aa9bc6d2c Merge "res_rtp_asterisk: Fix sequence number cycling and packet loss count." into 16 2019-05-15 17:48:51 -05:00
Friendly Automation
2de4f668be Merge "conversions.c: Add conversions for largest max sized integer" into 16 2019-05-15 07:01:43 -05:00
Friendly Automation
a1a8c47f53 Merge "Fixes for GCC 9" into 16 2019-05-15 06:27:01 -05:00
Friendly Automation
790b9223ed Merge "build: Pass --fno-partial-inlining to third-party when appropriate" into 16 2019-05-15 05:47:32 -05:00