Commit graph

30342 commits

Author SHA1 Message Date
Joshua Colp
d8c6852bdc Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used." 2017-11-21 10:33:28 -06:00
Joshua Colp
11cb4f2715 Merge "app: Remove silly usage of RAII_VAR." 2017-11-21 09:42:11 -06:00
Joshua Colp
40c3114013 Merge "ccss: Remove silly usage of RAII_VAR." 2017-11-21 09:27:20 -06:00
Corey Farrell
90f9885f73 README: Convert to README.md.
Convert the README file to markdown format, remove the old README.  This
causes websites like github to display the README in a much nicer
format with live links.  The raw file is still very readable from
plain text editors and terminals.

Change-Id: I7d13131764a9a9026e5f8a6ddb245a01bbd788e7
2017-11-21 09:58:07 -05:00
Corey Farrell
b79d04f8f8 CLI: Finish conversion of completion handling to vectors.
Change-Id: Ib81318f4ee52a5e73b003316e13fe9be1dd897a1
2017-11-21 09:48:36 -05:00
Corey Farrell
fbb8c0d3e4 CLI: Refactor cli_complete.
* Stop using "_COMMAND NUMMATCHES" on remote consoles.  Using this
  command had doubled the amount of work needed from the Asterisk
  daemon for each completion request.
* Fix code formatting.
* Remove static buffer used to send the command, use the same buffer
  that will receive the results.
* Move sort from ast_cli_display_match_list.

Change-Id: Ie2211b519a3d4bec45bf46e0095bdd01d384cb69
2017-11-21 09:48:36 -05:00
Corey Farrell
1cd24cd726 CLI: Rewrite ast_el_strtoarr to use vector's internally.
This rewrites ast_el_strtoarr to use vector's internally, but still
return the original NULL terminated array of strings.

Change-Id: Ibfe776cbe14f750effa9ca360930acaccc02e957
2017-11-21 09:48:36 -05:00
Corey Farrell
9c0a2110f0 CLI: Refactor ast_cli_display_match_list.
* Stop estimating line count, just print until we run out of matches.
* Stop freeing entries, the caller does that anyways.
* Stop calculating / returning numoutput, it was ignored.

Change-Id: I7f92afa8bea92241a95227587367424c8c32a5cb
2017-11-21 09:48:36 -05:00
Corey Farrell
9587a61f4c CLI: Create ast_cli_completion_add function.
Some completion generators are very inefficent due to the way CLI
requests matches one at a time.  ast_cli_completion_add can be called
multiple times during one invokation of a CLI generator to add all
results without having to reinitialize the search state for each match.

Change-Id: I73d26d270bbbe1e3e6390799cfc1b639e39cceec
2017-11-21 09:39:19 -05:00
Corey Farrell
a02cbc2ef3 CLI: Remove calls to ast_cli_generator.
The ability to add to localized storage cannot be supported by
ast_cli_generator.  The only calls to ast_cli_generator should be by
functions that need to proxy the CLI generator, for example 'cli check
permissions' or 'core show help'.

* ast_cli_generatornummatches now retrieves the vector of matches and
  reports the number of elements (not including 'best' match).
* test_substitution retrieves and iterates the vector.

Change-Id: I8cd6b93905363cf7a33a2d2b0e2a8f8446d9f248
2017-11-21 09:39:19 -05:00
Joshua Colp
3abf8dfeae Merge "cli: Remove silly usage of RAII_VAR." 2017-11-21 07:54:59 -06:00
Joshua Colp
146f6b92eb Merge "loader: Fix comments in struct ast_module." 2017-11-21 06:54:25 -06:00
Joshua Colp
86e894c074 Merge "menuselect: Remove ineffective weak attribute detection." 2017-11-21 06:50:56 -06:00
Joshua Colp
f5b2746355 Merge "CLI: Create ast_cli_completion_vector." 2017-11-21 05:24:07 -06:00
Joshua Colp
def556237a Merge "README: Send people to secure websites where available." 2017-11-21 05:23:47 -06:00
Joshua Colp
81041aacbd Merge "Build: Fix issues building without SSL." 2017-11-21 05:23:24 -06:00
Joshua Colp
e49fd5c3cc Merge "Build: Fix OSX build issues." 2017-11-21 05:22:39 -06:00
Alexander Traud
491e2eba0d chan_sip: ICE contained square brackets around IPv6 addresses.
ASTERISK-27434

Change-Id: Iaeed89b4fa05d94c5f0ec2d3b7cd6e93d2d5a8f7
2017-11-21 10:52:10 +01:00
Corey Farrell
10b4b5d200 loader: Fix comments in struct ast_module.
Make the comments follow doxygen format, move comments to the line
before each field they describe.

Change-Id: Ic445468398b5e88f13910f7c2f70bd15aad33a27
2017-11-20 19:20:40 -05:00
Joshua Colp
a2caade298 Merge "res_pjsip: Use sorcery prefix operation for contact lookup" 2017-11-20 16:48:23 -06:00
Joshua Colp
5db911bf7d Merge "acl: Fix allocation related issues." 2017-11-20 16:47:56 -06:00
Joshua Colp
d415eba990 Merge "bridge_basic: Ignore answer from transfer target when they've timed out." 2017-11-20 14:54:48 -06:00
Corey Farrell
9ae805c900 cli: Remove silly usage of RAII_VAR.
Change-Id: I81aacfee7cd26e4fc5eef07bca582700c2975bd7
2017-11-20 14:32:46 -06:00
Joshua Colp
6b1fa96f25 Merge "doxygen: Remove obsolete contents." 2017-11-20 14:29:40 -06:00
Corey Farrell
89ccab95c2 ccss: Remove silly usage of RAII_VAR.
Change-Id: I5ce40035e0a940e4e56f6322c1dcd47fbd509b98
2017-11-20 14:26:11 -06:00
Corey Farrell
5e99c334d1 app: Remove silly usage of RAII_VAR.
Change-Id: Ideb594f7aae134974fb78d5477ba0853b97b8625
2017-11-20 14:21:32 -06:00
Corey Farrell
abdd9fa1a8 aoc: Remove silly usage of RAII_VAR.
Change-Id: I07907f833b81aeb0128bc9442a2abb52679c7511
2017-11-20 14:05:25 -06:00
Corey Farrell
48e1b39b28 abstract_jb: Remove silly usage of RAII_VAR.
Change-Id: I9d56175369363d1dc735504cf78a3a5577069f49
2017-11-20 14:03:25 -06:00
Joshua Colp
7c3bf5af20 Merge "res_fax: Remove checks for unsigned values being >= 0." 2017-11-20 13:33:35 -06:00
Corey Farrell
d6bbcec571 res_mwi_external_ami: Remove incorrect load priority.
res_mwi_external_ami specified AST_MODFLAG_LOAD_ORDER but didn't set
load_pri, resulting in an actual load priority of 0.  This module only
provides AMI actions so it has no reason to load early.

Change-Id: I82987fcf10d3ea42716b2f9df915b16687fd5839
2017-11-20 13:19:09 -06:00
Corey Farrell
58fa3885cc Loader: Remove unneeded load_pri declarations.
Instead of specifying AST_MODFLAG_LOAD_ORDER with load_pri
AST_MODPRI_DEFAULT just use AST_MODFLAG_DEFAULT.

Change-Id: I0123258eafce324249433a69df15a85cc16e509f
2017-11-20 13:17:55 -06:00
Joshua Colp
c2d97a98b2 Merge "res_snmp: Declare RONLY if net-snmp headers do not." 2017-11-20 12:13:01 -06:00
Joshua Colp
8115ab79ac Merge "iostream: Fix ast_iostream_printf declaration." 2017-11-20 11:54:06 -06:00
Joshua Colp
0e6e1fcc4d Merge "tests: Fix warnings found on Mac." 2017-11-20 11:32:51 -06:00
Joshua Colp
56d85fd2c5 Merge "app_minivm: Fix possible uninitialized return value." 2017-11-20 10:39:16 -06:00
Alexander Traud
7397961b02 BuildSystem: pjsip_evsub_set_uas_timeout was not used.
ASTERISK-27435

Change-Id: Id318a7ae6d7d69b53f911d30bf3eece64852f15c
2017-11-20 16:49:04 +01:00
Joshua Colp
e6438dabd0 Merge "res_pjsip: Fix warning by deferring implicit type cast." 2017-11-20 09:44:12 -06:00
Corey Farrell
b4f7f8250f Build: Fix OSX build issues.
OSX does not support 'readlink -f' or 'sed -r'.  Replace readlink with
the GNU make macro 'realpath'.  Replace sed with grep in one place, cut
in the other.

ASTERISK-27332

Change-Id: I5d34ecca905384decb22ead45c913ae5e8aff748
2017-11-19 14:33:26 -06:00
Corey Farrell
999e0c17d7 Build: Fix issues building without SSL.
* Fix conditional in libasteriskssl.
* Use variables produced by configure to link the SSL and uuid libraries
  into libasteriskpj.so instead of hard-coding them.

ASTERISK-27431

Change-Id: I3977931fd3ef8c4e4376349ccddb354eb839b58d
2017-11-19 14:27:25 -06:00
Corey Farrell
53f42cc052 res_pjsip: Fix warning by deferring implicit type cast.
Mac doesn't like the comparison of -1 to an enum, so store the result of
ast_sip_str_to_dtmf to an int so we can check for the negative return
value.  ast_sip_str_to_dtmf returns an int so this is only delaying the
implicit type cast.

Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
2017-11-19 13:31:58 -06:00
Corey Farrell
75cb403775 tests: Fix warnings found on Mac.
test_pbx used raise without explicitly including signal.h.  On Mac for
some reason nothing else includes it.

test_logger checked if an unsigned int was negative.  Switch the
variable to 'int' so that error check can be effective.

Change-Id: Ie1db5dd1818ac25cc2ae41b644f848b5865b1362
2017-11-18 22:13:32 -05:00
Corey Farrell
83a2c4d2ae res_snmp: Declare RONLY if net-snmp headers do not.
Some net-snmp builds do not provide the RONLY declare, only
NETSNMP_OLDAPI_RONLY.  Map RONLY to NETSNMP_OLDAPI_RONLY to get around
this error.

Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577
2017-11-18 21:25:50 -05:00
Corey Farrell
5a899fc503 res_fax: Remove checks for unsigned values being >= 0.
It's impossible for gwtimeout or fdtimeout to be less than 0 because
they are unsigned int's.  Remove checks and unreachable branches.

Change-Id: Ib2286960621e6ee245e40013c84986143302bc78
2017-11-18 21:02:17 -05:00
Corey Farrell
b4862e463c iostream: Fix ast_iostream_printf declaration.
This adds the printf attribute and changes 'fmt' from 'const void *' to
'const char *'.  This resolves a warning from some compiler for
vsnprintf needing a literal string for format.

Change-Id: I71c33a8262590042ee451e1146760c10bb22fb78
2017-11-18 20:50:48 -05:00
Corey Farrell
2fab3aacd6 app_minivm: Fix possible uninitialized return value.
Declare 'res' initialized to -1 to deal with earlier error paths that
could cause 'res' to be returned uninitialized.

Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
2017-11-18 20:29:16 -05:00
Pirmin Walthert
0ca406c202 res_rtp_asterisk.c: Fix rtp source address learning for broken clients
Some clients do not send rtp packets every ptime ms. This can lead to
situations in which the rtp source learning algorithm will never learn
the address of the client. This has been discovered on a Mac mini with
a pjsip based softphone after updating to Sierra: as soon as USB
headsets are involved, the softphone will send the second packet 30ms
after the first, the third 30ms after the second and the fourth 1ms
after the third. So in the old implmentation the rtp source learning
algorithm was repeatedly reset on the fourth packet.

The patch changes the algorithm in a way that doesn't take the arrival
time between two consecutive packets into account but the time between
the first and the last packet of a learning sequence.

The patch also fixes a second problem: when a user was using a wrong
value for the probation setting there was a LOG_WARNING output stating
that the value had been set to the default value instead. However
the code for setting the value back to defaults was missing.

ASTERISK-27421 #close

Change-Id: If778fe07678a6fd2041eaca7cd78267d0ef4fc6c
2017-11-18 03:53:50 -05:00
Corey Farrell
9316a064fd README: Send people to secure websites where available.
We should be sending people to secure web URL's where available.
Update README's and docs.

Change-Id: Id5b1e049b0b18b49a784f1254605aefa244ce19a
2017-11-17 21:10:55 -05:00
Corey Farrell
5d0529c4d9 doxygen: Remove obsolete contents.
Remove doxygen contents that have nothing to do with the current state
of Asterisk.

Change-Id: Ic072cc8641f9533a202990ccf275ce87e3efd95c
2017-11-17 20:54:33 -05:00
Sean Bright
1b6e4c1175 res_pjsip: Use reasonable buffer lengths for endpoint identification
Domains themselves can be up to 255 characters long (per RFC 1035), so
our current buffer sizes are wholly inadequate for many use cases.

Change-Id: If3f30a68307f1365a1fe06bc4b854c62842c9292
2017-11-17 11:22:04 -05:00
Corey Farrell
b9f4bb5988 menuselect: Remove ineffective weak attribute detection.
menuselect detects compiler support for multiple styles of weak
functions.  This is a remnant from 2013 when OPTIONAL_API required weak
functions.  It is no longer correct for menuselect to switch
dependencies from optional to required based on lack of weak function
support.

Note an issue remains - dependencies should switch from optional to
required based on OPTIONAL_API being enabled or disabled.  I don't think
this is possible.  menuselect needs to know at startup if OPTIONAL_API
is enabled or disabled, so the only way to fix this is to remove
OPTIONAL_API from menuselect and create a configure option.  I've left
the code that switches in place but it's preprocessed out.

Additionally removed:
- WEAKREF variable from Asterisk makeopts.in.
- Related disabled code from test_utils.
- Pointless AC_REVISION call from menuselect/configure.ac.

Change-Id: Ifa702e5f98eb45f338b2f131a93354632a8fb389
2017-11-17 10:39:08 -05:00