Commit Graph

30200 Commits

Author SHA1 Message Date
George Joseph
acfdfcd19e ast_coredumper: Fix output directory and variable precedence
The OUTPUTDIR variable in ast_debug_tools.conf.sample is now set
to "/tmp" instead of "/some/directory".

Variables set on the command line or that are already in the
environment now take predecence over variables set in the config files.

ASTERISK-27846
Reported by: Ted G

Change-Id: Ie8baec52d531886bf5849ec1d59bb59dc87ad387
2018-05-24 13:00:06 -06:00
Joshua Colp
bb33dafa8f Merge "tcptls: Repair ./configure --with-ssl=PATH." into 13 2018-05-24 06:07:18 -05:00
Joshua Colp
27a8189b0c Merge "channel.c: Fix off nominal channel allocation failure path." into 13 2018-05-24 05:15:50 -05:00
Joshua Colp
751652ec59 Merge "config.c: Fix successful DELETE treated as failure" into 13 2018-05-24 05:10:07 -05:00
Richard Mudgett
90a075221b channel.c: Fix off nominal channel allocation failure path.
__ast_channel_alloc_ap() had a failure exit path that hadn't setup the fd
descriptors to -1 yet.  The destructor would then attempt to close these
fd's that had never been opened.

Change-Id: Icf21093f36c60781e8cf6ee9d586536302af33e3
2018-05-22 17:17:31 -05:00
Alexei Gradinari
d6145087cf config.c: Fix successful DELETE treated as failure
The config engine destroy_func callback function returns the number of
rows deleted or -1 on error.  But the function
ast_destroy_realtime_fields treated non-zero return values as error.

ASTERISK-27863

Change-Id: Ied02b38e8196cb03043e609a0679feebd288d17b
2018-05-21 16:23:56 -06:00
Joshua Colp
6dbecc2319 Merge "app_voicemail: Fix data-type mismatch between app_voicemail and database" into 13 2018-05-21 09:05:37 -05:00
Alexander Traud
b6234f9577 tcptls: Repair ./configure --with-ssl=PATH.
SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 got discovered without honoring a PATH.

ASTERISK-27865

Change-Id: I8cd358eed7411726d08fa7b01691bef122fbeb71
2018-05-19 07:26:03 -06:00
Kevin Harwell
835cbbe38c Merge "app_voicemail: Fix incorrect msg leaving/retrieving an ODBC voicemail" into 13 2018-05-18 16:43:06 -05:00
Jenkins2
aa37dad11a Merge "chan_mobile: support handling of caller-id names ("cnam")." into 13 2018-05-18 16:06:34 -05:00
Jenkins2
9564fc19f5 Merge "res_pjsip_endpoint_identifier_ip: Unregister the module for headers." into 13 2018-05-18 15:18:33 -05:00
Nic Colledge
436d17fa50 app_voicemail: Fix incorrect msg leaving/retrieving an ODBC voicemail
Correct the log warning message shown when ODBC voicemail
retrieve_file is called and there is a null value in the category
column.
A more meaningfull message is now written at debug level.

ASTERISK-27853

Change-Id: Ic36e97d5eb070a23a12ba45972f6b53e2182a3f4
2018-05-17 15:55:18 -06:00
Brian P. Martin
8c1202beb9 chan_mobile: support handling of caller-id names ("cnam").
Add support to handle caller-ID names ("cnam") in addition to caller-ID
numbers.  The prior code ignored the caller-ID name altogether, and
used the local name for the cell phone (e.g. "my-iphone") in its place.

Note: as of this writing, at least some Android phones don't pass cnam to
us. This can be seen by issuing "core set debug 2" in the CLI and watching
the "CLIP" record when a call comes in.  If cnam isn't in the CLIP record,
there's nothing we can do to provide one.  We'll provide a null cnam field,
so later Asterisk processes know to try other sources (e.g. cidname database,
OpenCNAM, etc.).

Reported by: Brian Martin
Tested by: Brian Martin
ASTERISK-27726

Change-Id: I89490d85fa406c36261879c50ae5e65595538ba5
2018-05-17 16:22:47 -05:00
Alexander Traud
b615df06d3 res_pjsip_endpoint_identifier_ip: Unregister the module for headers.
Asterisk uses Reference Counting to track whether a module can be unloaded.
Every consumer who requires a module, increases the reference count. When the
consumer goes, is unloaded itself, it has to decrease the reference count on
all its used/required modules. That way
 core stop gracefully
works on the command-line interface (CLI): One module after the other is
unloaded. A recent change broke this for the module res_pjsip.

ASTERISK-27861

Change-Id: I261abcb411d026bbb0691cc78f28300bfd3103a3
2018-05-17 01:02:38 -06:00
Alexander Traud
99b24dc63b res_pjsip: Register pjsip_transport_management not externally but internally.
The module (res_)pjsip_transport_management got moved into res_pjsip. It is no
longer an independent/external module with (un)load_module and therefore has to
register just internally with res_pjsip.

ASTERISK-27860

Change-Id: Icd0413be7d2e98b92f51e6d6c353f2570bb4be95
2018-05-16 23:35:32 -06:00
Jenkins2
0afe108dd6 Merge "cli: Display correct unit for HTTP timeout in "manager show settings"." into 13 2018-05-16 09:40:58 -05:00
Jenkins2
118eef8907 Merge "Fix GCC 8 build issues." into 13 2018-05-16 09:37:35 -05:00
Joshua Colp
23e58ec220 Merge "rtp_engine: Remove the double assigned RTP payload ID of H.263+." into 13 2018-05-15 04:13:41 -05:00
Joshua Colp
8926bc20fd Merge "rtp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code." into 13 2018-05-14 06:25:06 -05:00
Jenkins2
3e65d3bee9 Merge "git: Ignore *.orig." into 13 2018-05-14 06:24:10 -05:00
Joshua Colp
ac9d6b0523 Merge "pjsip: Rewrite OPTIONS support with new eyes." into 13 2018-05-14 04:06:20 -05:00
Nic Colledge
36f08075da app_voicemail: Fix data-type mismatch between app_voicemail and database
Fix data-type mismatch between app_voicemail and database columns
exposed by new version of MariaDB

ASTERISK-27760

Change-Id: I8543ad480a08c98be78bde1ee870e6e6c84b2c5b
2018-05-12 11:22:23 +01:00
Alexander Traud
308a967470 rtp_engine: Remove the double assigned RTP payload ID of H.263+.
Mantis-3709 (Commit 68ff3c3, Asterisk 1.2) added support for the video format
H.263+. For this, the RTP payload ID 103 got assigned statically. Commit f1aadc8
assigned another payload ID 98 for this format in Asterisk 1.6.

Change-Id: I90e35b158487f8f1f8187da6241b54cd3b74e667
2018-05-11 11:50:01 -06:00
Corey Farrell
67212eae87 cli: Display correct unit for HTTP timeout in "manager show settings".
HTTP timeout is in seconds, not minutes.

ASTERISK-27852 #close

Change-Id: Ie6640835cb07307555741f9b559c2eb876d9343e
2018-05-11 13:26:39 -04:00
Alexander Traud
9fe4f99cba rtp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code.
Change-Id: Ica089d4507a27ddfc4ce3a88d697ffbef378de48
2018-05-11 09:38:20 -06:00
Corey Farrell
d893e57c90 Fix GCC 8 build issues.
This fixes build warnings found by GCC 8.  In some cases format
truncation is intentional so the warning is just suppressed.

ASTERISK-27824 #close

Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
2018-05-11 09:58:19 -04:00
Joshua Colp
a722e79434 Merge "makeopts.in: Remove unused/undefined AST_MARCH_NATIVE." into 13 2018-05-10 03:45:35 -05:00
Joshua Colp
eba5ead107 Merge "sip_to_pjsip: Enable python3 compatibility." into 13 2018-05-09 19:01:02 -05:00
Matthew Fredrickson
316efcddb9 res_hep: Adds hostname resolution support for capture_address
Previously, only an IP address would be accepted for the capture_address config
setting in hep.conf.  This change allows capture_address to be a resolvable
hostname or an IP address.

ASTERISK-27796 #close
Reported-By: Sebastian Gutierrez

Change-Id: I33e1a37a8b86e20505dadeda760b861a9ef51f6f
2018-05-09 14:14:08 -06:00
Jenkins2
6783eb8cca Merge "app_macro: Prevent infinite loop in find_matching_priority." into 13 2018-05-09 11:27:42 -05:00
Corey Farrell
19ebad0d30 git: Ignore *.orig.
This prevents accidental commit of files created by patch.

Change-Id: I68380db61f0f9d620046f719ccd978811d0e9964
2018-05-09 10:30:41 -04:00
Alexander Traud
c6a4d34b7f sip_to_pjsip: Enable python3 compatibility.
The script remains compatible with Python 2.7 but now also works with
Python 3.3 and newer; to ease the migration from chan_sip to chan_pjsip.

ASTERISK-27811

Change-Id: I59cc6b52a1a89777eebcf25b3023bdf93babf835
2018-05-09 07:46:42 -06:00
Corey Farrell
ba6034db48 makeopts.in: Remove unused/undefined AST_MARCH_NATIVE.
Change-Id: I617a96ebb83ec99f5d3176bbbee2d2a272ccb203
2018-05-08 15:28:10 -04:00
Jaco Kroon
47548ff485 manager: fix digest auth for ami/http mechanism.
Due to a fixed size buffer the digest authentication could be
incorrectly calculated if a large URI was provided, causing
authentication failure. The buffer is now dynamically allocated to allow
any size URI within the normal limits of the HTTP request size.

ASTERISK-27841

Change-Id: I660609db13b8f9e5f9567f339dd804f4985d41b3
2018-05-08 10:21:16 -04:00
Corey Farrell
5dffdf79d1 app_macro: Prevent infinite loop in find_matching_priority.
Use AST_PBX_MAX_STACK to escape if we recurse 128 times.  This will
prevent crash if dialplan contains an include loop.  Log an error when
this occurs, at most one message per call to Macro() so we avoid logger
spam.

ASTERISK-26570 #close

Change-Id: I6c71b76998c31434391b150de055ae9a531e31da
2018-05-07 07:59:00 -06:00
Jenkins2
2d0fb07f53 Merge "res_ari: Remove requirement that body exists when debug is on." into 13 2018-05-04 06:08:40 -05:00
Jenkins2
8966a39e9d Merge "res_pjsip/pjsip_distributor.c: Add missing off-nominal request response." into 13 2018-05-03 12:11:00 -05:00
Joshua Colp
6192e40e04 Merge "pjsip: Increase maximum number of usable ciphers & other cleanups" into 13 2018-05-03 07:25:17 -05:00
Joshua Colp
a36d6e3674 res_ari: Remove requirement that body exists when debug is on.
The "ari set debug" code for incoming requests incorrectly assumed
that all requests would contain a body. If one did not exist the
request would be incorrectly rejected. The response that was sent
was also incomplete as an incorrect function was used to construct
the response.

The code has now been changed to no longer require a request to have
a body and the response updated to use the correct function.

ASTERISK-27801

Change-Id: I4eef036ad54550a4368118cc348765ecac25e0f8
2018-05-03 11:34:32 +00:00
Sean Bright
850e554793 pjsip: Increase maximum number of usable ciphers & other cleanups
* Increase maximum number of ciphers from 100 to 256 (or whatever
  PJ_SSL_SOCK_MAX_CIPHERS is #define'd to)

* Simplify logic in cipher_name_to_id()

* Make signed/unsigned comparison consistent

Re: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897412

Reported by: Ondřej Holas

Change-Id: Iea620f03915a1b873e79743154255c3148a514e7
2018-05-02 09:03:59 -04:00
Richard Mudgett
51a6a986f1 res_pjsip/pjsip_distributor.c: Add missing off-nominal request response.
Change-Id: I389579b39c523d1d1e8ce020ef549a8bb5781c9b
2018-05-01 17:22:53 -05:00
Richard Mudgett
3663968705 res_pjsip/pjsip_distributor.c: Pull some assignments out of if tests.
Change-Id: I3d30d638b53a4bbe9bf9aad853c649d583894112
2018-05-01 17:17:06 -05:00
George Joseph
42abc9c430 Merge "BuildSystem: Add DragonFly BSD." into 13 2018-04-30 09:06:45 -05:00
George Joseph
0a9c7443bd Merge "translate: generic plc not filled in after translation" into 13 2018-04-30 08:38:09 -05:00
George Joseph
2b50b31b68 Merge "app_sendtext: Enhance SendText to support Enhanced Messaging" into 13 2018-04-30 07:35:17 -05:00
Joshua Colp
bea52b3706 pjsip: Rewrite OPTIONS support with new eyes.
The OPTIONS support in PJSIP has organically grown, like many things in
Asterisk.  It has been tweaked, changed, and adapted based on situations
run into.  Unfortunately this has taken its toll.  Configuration file
based objects have poor performance and even dynamic ones aren't that
great.

This change scraps the existing code and starts fresh with new eyes.  It
leverages all of the APIs made available such as sorcery observers and
serializers to provide a better implementation.

1.  The state of contacts, AORs, and endpoints relevant to the qualify
process is maintained.  This state can be updated by external forces (such
as a device registering/unregistering) and also the reload process.  This
state also includes the association between endpoints and AORs.

2.  AORs are scheduled and not contacts.  This reduces the amount of work
spent juggling scheduled items.

3.  Manipulation of which AORs are being qualified and the endpoint states
all occur within a serializer to reduce the conflict that can occur with
multiple threads attempting to modify things.

4.  Operations regarding an AOR use a serializer specific to that AOR.

5.  AORs and endpoint state act as state compositors.  They take input
from lower level objects (contacts feed AORs, AORs feed endpoint state)
and determine if a sufficient enough change has occurred to be fed further
up the chain.

6.  Realtime is supported by using observers to know when a contact has
been registered.  If state does not exist for the associated AOR then it
is retrieved and becomes active as appropriate.

The end result of all of this is best shown with a configuration file of
3000 endpoints each with an AOR that has a static contact.  In the old
code it would take over a minute to load and use all 8 of my cores.  This
new code takes 2-3 seconds and barely touches the CPU even while dealing
with all of the OPTIONS requests.

ASTERISK-26806

Change-Id: I6a5ebbfca9001dfe933eaeac4d3babd8d2e6f082
2018-04-27 17:26:54 -05:00
George Joseph
c5d19565fe Merge "bridge_softmix: Forward TEXT frames" into 13 2018-04-27 13:17:27 -05:00
Joshua Colp
aac46639e5 Merge "BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD." into 13 2018-04-26 19:06:31 -05:00
Joshua Colp
5b0a58bc3e Merge "install_prereq: Add DragonFly BSD." into 13 2018-04-25 13:55:19 -05:00
Joshua Colp
8c5f4dade3 Merge "format_pcm: Correct behavior of fseek and ftell for G.722" into 13 2018-04-25 13:30:42 -05:00