Commit Graph

31021 Commits

Author SHA1 Message Date
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
Guido Falsi
ac4921c373 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 16:44:07 +02:00
Alexei Gradinari
6ded762dbf 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-23 08:37:18 -06:00
George Joseph
d6fb8abd84 Merge "res_rtp_asterisk: Add ability to propose local address in ICE" into 13 2019-05-22 12:46:41 -05:00
Joshua Colp
fc49632bbc 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 12:36:56 -06:00
George Joseph
90fe830a77 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:51 -06:00
Alexei Gradinari
595d60846a pjsip: replace 180 by 183 if SDP negotiation has completed
The caller endpoint hears dead silence if a callee replies 180 (without SDP)
and the caller already received 183 (with SDP).
It happens because Asterisk sends 180 (WITH SDP) to the caller,
there are not incoming RTP packets from the callee
and Asterisk does not generate inband ringing,
so there are not any outgoing RTP packets to the caller.

This patch replaces 180 by 183 if SDP negotiation has completed,
as if the caller endpoint is configured with "inband_progress=yes".

In this case Asterisk will generate inband ringing untill Asterisk receive
incoming RTP packets from the callee.

ASTERISK-27994 #close

Change-Id: I7450b751083ec30d68d6abffe922215a15ae5a73
2019-05-16 08:47:28 -06:00
Friendly Automation
fa98e8cacb Merge "Fixes for GCC 9" into 13 2019-05-15 06:21:57 -05:00
Friendly Automation
7067177be4 Merge "build: Pass --fno-partial-inlining to third-party when appropriate" into 13 2019-05-15 05:47:36 -05:00
Joshua Colp
e6cedc77a4 Merge "pjsip_options.c: Allow immediate qualifies for new contacts." into 13 2019-05-13 14:11:32 -05:00
George Joseph
4337895aee Fixes for GCC 9
Various fixes for issues caught by gcc 9.  Mostly snprintf
trying to copy to a buffer potentially too small.

ASTERISK-28412

Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
2019-05-10 10:19:50 -06:00
Friendly Automation
92832bf176 Merge "Revert "pjproject-bundled: Add upstream timer fixes"" into 13 2019-05-08 12:22:12 -05:00
George Joseph
c41e3184e3 Revert "pjproject-bundled: Add upstream timer fixes"
This reverts commit cfeb8a59eb.

The fixes in question cause assert failures when pjproject
asserts are enabled.  Reverting in 13 until a solution is
found for all branches.

Change-Id: Iae5bd340e0543613185fecb63f9c86fa985fe664
2019-05-07 14:24:15 -05:00
Ben Ford
f71a0e3f60 pjsip_options.c: Allow immediate qualifies for new contacts.
When multiple endpoints try to register close together using the same
AOR with qualify_frequency set, one contact would qualify immediately
while the other contacts would have to wait out the duration of the
timer before being able to qualify. Changing the conditional to check
the contact container count for a non-zero value allows all contacts to
qualify immediately.

Change-Id: I79478118ee7e0d6e76af7c354d66684220db9415
2019-05-07 11:25:55 -05:00
Friendly Automation
8b0029692f Merge "pjproject-bundled: Add upstream timer fixes" into 13 2019-05-06 05:43:28 -05:00
George Joseph
7646e2257f build: Pass --fno-partial-inlining to third-party when appropriate
When the gcc version is >= 8.2.1, we were already setting the
--fno-partial-inlining flag for Asterisk source files to get around
a gcc bug but we weren't passing the flag down to the bundled
builds of pjproject and jansson.

ASTERISK-28392

Change-Id: I99ede9bc35408ecd096f7d5369e8192d3dc75704
2019-05-03 12:31:06 -06:00
George Joseph
cfeb8a59eb 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: I02a791fd1570a1e594a132b36c4ff72441108c17
2019-05-03 07:52:09 -06:00
George Joseph
9d8a093a94 res_pjsip: Check return from pjsip_parse_uri calls
Updated ast_sip_create_rdata_with_contact and registrar_find_contact
to check the return from pjsip_parse_uri before attempting to
use the uri returned.

ASTERISK-28402
Reported-by: Ross Beer

Change-Id: I9810b3b163c45ed5a56ec743586e5ce107f13ba7
2019-05-02 12:29:49 -06:00
George Joseph
6edef49525 Merge "mwi core: Move core MWI functionality into its own files" into 13 2019-04-30 10:42:13 -05:00
Friendly Automation
66aa081bb3 Merge "app_amd: Fix infinite loop on silent calls" into 13 2019-04-30 10:03:43 -05:00
Friendly Automation
57a9935ae0 Merge "stasis: Fix crash at shutdown." into 13 2019-04-30 05:45:13 -05:00
agupta
188b1d3e68 app_amd: Fix infinite loop on silent calls
The total time logic will now be executed on calls which
do not pass any media.

ASTERISK-28143

Change-Id: I24726bd29d7e467fc721ca265363417234b22855
2019-04-30 04:15:26 -06:00
Friendly Automation
10b46eea9e Merge "app_dial.c: RINGTIME, PROGRESSTIME and ms resolution dial timings" into 13 2019-04-25 14:06:05 -05:00
Ben Ford
4589260961 stasis: Fix crash at shutdown.
When compiling in dev mode, stasis statistics are enabled and can cause
a crash at shutdown due to the following:
- Containers are freed
- Topics and subscriptions remain
- When those topics and subscriptions are deallocated, they go to do
  things with the container

This changes the containers to global ao2 objects, and whenever needed
in the code, a reference must be obtained and checked before any
operations can be done.

ASTERISK-28353 #close

Change-Id: Ie7d5e907fcfcb4d65bd36d5e4eb923126fde8d33
2019-04-24 08:47:35 -05:00
Antoni Goldstein
001e7762e4 app_dial.c: RINGTIME, PROGRESSTIME and ms resolution dial timings
Added RINGTIME, RINGTIME_MS, PROGRESSTIME, PROGRESSTIME_MS variables filled
at the earliest received PROGRESS or RINGING.
Added millisecond versions of DIALEDTIME and ANSWEREDTIME.

Added millisecond versions of ast_channel_get_up_time and
ast_channel_get_duration in channel.c.

ASTERISK-28363

Change-Id: If95f1a7d8c4acbac740037de0c6e3109ff6620b1
2019-04-24 08:27:28 -04:00
Kevin Harwell
4ea20c9c85 mwi core: Move core MWI functionality into its own files
There is enough MWI functionality to warrant it having its own 'c' and header
files. This patch moves all current core MWI data structures, and functions
into the following files:

main/mwi.h
main/mwi.c

Note, code was simply moved, and not modified. However, this patch is also in
preparation for core MWI changes, and additions to come.

Change-Id: I9dde8bfae1e7ec254fa63166e090f77e4d3097e0
2019-04-23 17:39:40 -05:00
Friendly Automation
e1e9274c57 Merge "ARI: Bump non-breaking version number to 1.10.2" into 13 2019-04-23 16:42:00 -05:00
Friendly Automation
72170f73e4 Merge "core/buildsystem: check the actual compiler being version" into 13 2019-04-23 15:23:41 -05:00
George Joseph
6d4023e3a6 ARI: Bump non-breaking version number to 1.10.2
main/json.c: Added app_name, app_data to channel type
res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics
res/res_ari: Added timestamp as a requirement for all ARI events

Change-Id: Ie0da5b0cf0623b0d0fddbb864f73cb676c2b55cd
2019-04-22 14:45:01 -06:00
Friendly Automation
dcd26ce6ac Merge "res_indications: Fix indications remove command autocomplete" into 13 2019-04-22 08:48:50 -05:00
Guido Falsi
8ee69fbdd0 core/buildsystem: check the actual compiler being version
Make compiler check use the output of the actual compiler being
used as reported by the CC variable, instead of unconditionally
running the "gcc" binary.  Also only run the check if the compiler
is gcc or a cross-compile gcc.

ASTERISK-28374

Change-Id: Icaacf6d93686ad21076878aa1504a23b4fc9d0f4
2019-04-22 07:04:40 -06:00
Lucas Mendes
aaee0fa6f5 res_indications: Fix indications remove command autocomplete
We changed the validation of autocomplete parameter in the "indications
remove" command to avoid continue the execution of the command after
asking for autocomplete out of range parameters.

ASTERISK-28391
Reported by: lmendes86

Change-Id: I92b24131fd02f2e3c7fec966eea6f7a663310d40
2019-04-19 16:33:49 +02:00
Dan Cropp
00588226c6 res_pjsip: Added a norefersub configuration setting
Added a new PJSIP global setting called norefersub.
Default is true to keep support working as before.

res_pjsip_refer:  Configures PJSIP norefersub capability accordingly.

Checks the PJSIP global setting value.
If it is true (default) it adds the norefersub capability to PJSIP.
If it is false (disabled) it does not add the norefersub capability
to PJSIP.

This is useful for Cisco switches that do not follow RFC4488.

ASTERISK-28375 #close
Reported-by: Dan Cropp

Change-Id: I0b1c28ebc905d881f4a16e752715487a688b30e9
2019-04-18 08:05:39 -06:00
Friendly Automation
94bbd75745 Merge "res_mwi_devstate: Specify AST_MODFLAG_LOAD_ORDER to enable load priority" into 13 2019-04-18 05:40:54 -05:00
Friendly Automation
bb1280b8c1 Merge "pbx.c: Ignore dashes in extensions when using extenpatternmatchnew" into 13 2019-04-16 12:09:24 -05:00
Friendly Automation
57f4bbf61f Merge "app_voicemail: Don't split mailbox options on comma" into 13 2019-04-16 11:32:19 -05:00
Sean Bright
33ed8fdadc res_mwi_devstate: Specify AST_MODFLAG_LOAD_ORDER to enable load priority
Suggested by abelbeck on the issue tracker.

ASTERISK~28384
Reported by: abelbeck

Change-Id: Icee0fff2b58dbfaa80f2b68270fe69dfb0463fc0
2019-04-16 12:03:52 -04:00
Benjamin Keith Ford
d15f01b294 Merge "build: Revise CHANGES and UPGRADE.txt handling." into 13 2019-04-16 10:52:21 -05:00
Joshua Colp
4cde7de0f0 Merge "res_ael: Use Gosub in for loop expressions" into 13 2019-04-16 08:08:51 -05:00
Joshua Colp
2a0e47e9cb Merge "res_ael: Fix pattern matching against literal '+'" into 13 2019-04-16 07:25:32 -05:00
George Joseph
e61e436b38 Merge "CI: Move test group config files to Jenkins" into 13 2019-04-15 08:06:21 -05:00