Commit Graph

29285 Commits

Author SHA1 Message Date
Corey Farrell
ec278955a3 main/Makefile: Remove rule for non-existant testexpr2.
Change-Id: Ibb3e47f27a395d74d8c5263db015b05434f5969b
2017-10-23 14:46:03 -04:00
Jenkins2
302626c115 Merge "app_agent_pool.c: Fix online documentation typo." into 13 2017-10-23 09:05:03 -05:00
Richard Mudgett
b4cb0050bd app_agent_pool.c: Fix online documentation typo.
Change-Id: Ib0bc95fd0ec288c78c313823254d7a84ebfc4429
2017-10-23 07:53:48 -05:00
Corey Farrell
fb4ed70e62 res_pjsip_pubsub: Prevent unload except during shutdown.
Prevent unload of the module as certain pjsip initialization functions
cannot be reversed.  This required a reorder of the module_load so that
the non-reversable pjsip functions are not called until all potential
errors have been ruled out.

ASTERISK-24483

Change-Id: Iee900f20bdd6ee1bfe23efdec0d87765eadce8a7
2017-10-19 10:35:07 -05:00
Joshua Colp
63e536d97f Merge "chan_sip: Fix output of 'sip set debug off'." into 13 2017-10-19 07:45:38 -05:00
Corey Farrell
216251abcb res_pjsip_refer: Prevent unload except during shutdown.
Prevent unload of the module as certain pjsip initialization functions
cannot be reversed.

ASTERISK-24483

Change-Id: I94597ec8b8491f5af9c57bf66dbc3b078fe2d49d
2017-10-18 13:40:24 -05:00
Corey Farrell
7dd7ca2858 chan_sip: Fix output of 'sip set debug off'.
When sip.conf contains 'sipdebug=yes' it is impossible to disable it
using CLI 'sip set debug off'.  This corrects the output of that CLI
command to instruct the user to turn sipdebug off in the configuration
file.

ASTERISK-23462 #close

Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
2017-10-18 12:13:32 -05:00
Jenkins2
dbafed0ed5 Merge "res_corosync: Fix linking issue with Corosync 2.x" into 13 2017-10-17 11:19:02 -05:00
Joshua Colp
c5f671e2df Merge "cdr.c: Rename the Party A CDR container." into 13 2017-10-17 11:06:25 -05:00
Jenkins2
4c83f685e6 Merge "cdr.c: Add container to key off of Party B channel names." into 13 2017-10-17 10:41:26 -05:00
Jenkins2
e1d713c40c Merge "contrib/script/sip_to_pjsip: implement 'all' for allow/disallow" into 13 2017-10-17 09:06:44 -05:00
Jenkins2
0d4febb1c8 Merge "chan_dahdi: wrap include file which is not present on BSD systems in #ifdef" into 13 2017-10-17 08:05:15 -05:00
Jenkins2
e7e181c2bc Merge "res_pjsip_session: Rewrite o= with external_media_address." into 13 2017-10-17 06:26:47 -05:00
Matt Jordan
0a11097a22 res_corosync: Fix linking issue with Corosync 2.x
At some point in time in the history of Corosync (certainly within the
2.x branch), the corosync_cfg_state_track function was removed.
Unfortunately, the cfg library is only linked if this function is
present. Without the cfg library being linked to res_corosync, loading
of res_corosync will fail.

This patch makes it so that detecting corosync's core libraries,
determined by the COROSYNC external library checks, links both the cpg
and cfg libraries with res_corosync.

Change-Id: I674e9e1c8fea11c3bf81154aaa7c1fd43f945465
2017-10-17 11:22:43 +00:00
Richard Mudgett
7f8c212e75 cdr.c: Rename the Party A CDR container.
* Rename the Party A CDR container from active_cdrs_by_channel to
active_cdrs_master.

* Renamed the support functions associated with active_cdrs_master
appropriately.

ASTERISK-27335

Change-Id: I6104bb3edc3a0b7243ce502e45e8832b0cff14f7
2017-10-16 12:23:35 -05:00
Richard Mudgett
85723a9e50 cdr.c: Add container to key off of Party B channel names.
The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is because of a n*m loop used when
processing Party B information.

* Added a new CDR container that is keyed to Party B so we don't need such
a large loop when processing Party B information.

NOTE: To reduce the size of the patch I deferred to another patch the
renaming of the Party A active_cdrs_by_channel container to
active_cdrs_master and renaming the container's hash and cmp functions
appropriately.

ASTERISK-27335

Change-Id: I0bf66e8868f8adaa4b5dcf9e682e34951c350249
2017-10-16 12:23:35 -05:00
Tzafrir Cohen
944e500e95 declare optional openssl dependencies in moduleinfo
Declare optional openssl dependencies in:
* res_rtp_asterisk.c
* tcptls.c

ASTERISK-27328 #close

Change-Id: I2636f1c05b8104b4fe6f36cce0ebd9a98b9c78ab
2017-10-16 06:03:13 -05:00
Jenkins2
ce0ef34020 Merge "ast_bt_get_symbols: Prevent double-free." into 13 2017-10-15 14:20:37 -05:00
Jenkins2
3b1324b13e Merge "tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it." into 13 2017-10-15 13:53:45 -05:00
Alexander Traud
dcbf61a31e res_pjsip_session: Rewrite o= with external_media_address.
PJSIP allows a domain name as external_media_address. This allows chan_pjsip to
be used behind a NAT with changing IP addresses. The IP address of that domain
is resolved to the c= line already. This change sets also the o= line to that
domain.

ASTERISK-27341 #close

Change-Id: I690163b6e762042ec38b3995aa5c9bea909d8ec4
2017-10-14 06:13:55 -05:00
Guido Falsi
85cada85d6 chan_dahdi: wrap include file which is not present on BSD systems in #ifdef
The sys/sysmacros.h include file does not exist in BSD systems and
is not required to build this module there.
Since an "#if defined(__NetBSD__) || defined(__FreeBSD__)" section
already exist I moved that include line inside it's #else branch.

ASTERISK-27343 #close

Change-Id: Ibfb64f4e9a0ce8b6eda7a7695cfe57916f175dc1
2017-10-14 11:11:24 +02:00
Jenkins2
6fc88e80e8 Merge "cdr.c: Eliminated many calls to ao2_global_obj_ref()." into 13 2017-10-13 18:43:03 -05:00
Jenkins2
31cbb53a0a Merge "cdr.c: Defer getting ao2_global_obj_ref() until needed." into 13 2017-10-13 17:55:34 -05:00
Jenkins2
bf21ba9c2d Merge "cdr.c: Set stringfields only if they are different." into 13 2017-10-13 17:00:10 -05:00
Jenkins2
d0cd6cb1a7 Merge "cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr" into 13 2017-10-13 16:44:38 -05:00
Kevin Harwell
4bc2aca9b7 AMI: Increase version number
Bump the AMI patch number since the following new addition was made:

* Added a new CancelAtxfer action that cancels an attended transfer.

Change-Id: I9bac528791bd62ef0e99243903b6bc7a6c7ab182
2017-10-13 12:11:21 -05:00
Corey Farrell
89f11364f6 ast_bt_get_symbols: Prevent double-free.
It's possible for bfdobj to be created but syms not created.  If syms
was not allocated in the current loop iteration but was allocated in the
previous iteration it would crash.

ASTERISK-27340

Change-Id: I5b110c609f6dfe91339f782a99a431bca5837363
2017-10-13 09:51:09 -04:00
Alexander Traud
114ed320ea tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it.
This avoids a crash on stopping a chan_sip which failed to start its TLS server.

ASTERISK-27339 #close

Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
2017-10-13 08:14:47 -05:00
Joshua Colp
7215d07ca2 Merge "features, manager : Add CancelAtxfer AMI action" into 13 2017-10-13 07:44:39 -05:00
Richard Mudgett
a8c6c3bd7d cdr.c: Eliminated many calls to ao2_global_obj_ref().
The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is we were getting the global config
to determine if we needed to log a debugging message.

* Many calls to ao2_global_obj_ref() were just so we could determine if
debug mode is enabled.  Made a global flag to check instead.

* Eliminated many RAII_VAR() usages associated with the remaining
ao2_global_obj_ref() calls.

* Added missing NULL checks for the returned ao2_global_obj_ref() value.

ASTERISK-27335

Change-Id: Iceaad93172862f610cad0188956634187bfcc7cd
2017-10-12 19:11:02 -05:00
Richard Mudgett
b56fa63db8 cdr.c: Defer getting ao2_global_obj_ref() until needed.
The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is we were getting the global config
even if we didn't need it.

* Most uses of the global config were only needed on off nominal code
paths so it makes sense to not get it until absolutely needed.

ASTERISK-27335

Change-Id: I00c63b7ec233e5bfffd5d976f05568613d3c2365
2017-10-12 19:11:02 -05:00
Richard Mudgett
92c5cf3920 cdr.c: Set stringfields only if they are different.
The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is we were repeatedly setting string
fields to potentially the same string in base_process_party_a().  Setting
a string field involves allocating room for the new string out of a memory
pool which may have to allocate even more memory.

* Check to see if the string field is already set to the desired string.

ASTERISK-27335

Change-Id: I3ccb7e23f1488417e08cafe477755033eed65a7c
2017-10-12 19:11:02 -05:00
Richard Mudgett
6393c106ca cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr
The string comparisons for setting these CDR variables was inverted.  We
were repeatedly setting these CDR variables only if the channel snapshots
had the same value.

ASTERISK-27335

Change-Id: I9482073524411e7ea6c03805b16de200cb1669ea
2017-10-12 19:11:02 -05:00
Jenkins2
28a3ff75d5 Merge "res_pjsip_session: Prevent user=phone being added to anonimized URIs." into 13 2017-10-12 12:22:10 -05:00
Thomas Sevestre
6d3ee9fb93 features, manager : Add CancelAtxfer AMI action
Add action to cancel feature attended transfer with AMI interface

ASTERISK-27215 #close

Change-Id: Iab8a81362b5a1757e2608f70b014ef863200cb42
2017-10-12 12:17:45 -05:00
Daniel Tryba
21d502818f res_pjsip_session: Prevent user=phone being added to anonimized URIs.
Move ast_sip_add_usereqphone to be called after anonymization of URIs,
to prevent the user_eq_phone adding "user=phone" to URIs containing a
username that is not a phonenumber (RFC3261 19.1.1). An extra call to
ast_sip_add_usereqphone on the saved version before anonymization is
added to add user=phone" to the PAI.

ASTERISK-27047 #close

Change-Id: Ie5644bc66341b86dc08b1f7442210de2e6acdec6
2017-10-12 11:05:28 -05:00
Jenkins2
603418aac7 Merge "cdr.c: Defer misc checks." into 13 2017-10-12 07:12:59 -05:00
Joshua Colp
5bed433e71 Merge "res_pjsip: Prevent "user=phone" being added multiple times to header" into 13 2017-10-12 07:01:18 -05:00
Torrey Searle
407b78504d contrib/script/sip_to_pjsip: implement 'all' for allow/disallow
when 'all' is specified in an allow or disallow section, it should erase
all values from the inverse section in the default config. E.G.
allow=all should erase any deny values from default config &
vice-versa

ASTERISK-27333 #close

Change-Id: I99219478fb98f08751d769daaee0b7795118a5a6
2017-10-12 05:41:28 -05:00
Jenkins2
b4113450e6 Merge "cdr_mysql: avoid releasing a config string" into 13 2017-10-11 19:09:52 -05:00
Jenkins2
b498942ba3 Merge "chan_vpb: Fix a gcc 7 out-of-bounds complaint" into 13 2017-10-11 16:28:29 -05:00
Daniel Tryba
af09996178 res_pjsip: Prevent "user=phone" being added multiple times to header
ast_sip_add_usereqphone adds "user=phone" to the header every time is is
called without checking whether the param already exists. Preventing
this by searching to string representation of header for "user=phone".

ASTERISK-26988 #close

Change-Id: Ib84383b07254de357dc6a98d91fc1d2c2c3719e6
2017-10-11 16:34:52 -04:00
Tzafrir Cohen
8e05796e81 cdr_mysql: avoid releasing a config string
Fixes a memory corruption issue after a reload of cdr_mysql.

Issue was accidentally included in 747beb1ed1 .

ASTERISK-27270 #close

Change-Id: I90b6a9d18710c0f9009466370bd5f4bac5d5d12e
2017-10-11 15:14:32 -05:00
Jenkins2
4a2caab4f6 Merge "app_originate: Set ORIGINATE_STATUS correctly on failure" into 13 2017-10-11 15:03:46 -05:00
Richard Mudgett
5f6bad6733 cdr.c: Defer misc checks.
Try to defer some checks until needed in case there is an early exit.

Change-Id: Ibc6b34c38a4f60ad4f9b67984b7d070a07257064
2017-10-11 13:28:26 -05:00
Jenkins2
4a0fa1ba59 Merge "cdr.c: Eliminated simple RAII_VAR usages." into 13 2017-10-11 12:18:55 -05:00
Joshua Colp
0430ae5d51 Merge "app_queue.c: clear moh field in init_queue" into 13 2017-10-11 11:05:27 -05:00
George Joseph
f3f141781c chan_vpb: Fix a gcc 7 out-of-bounds complaint
chan_vpb was trying to use sizeof(*p->play_dtmf), where
p->play_dtmf is defined as char[16], to get the length of the array
but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)
returns the size of the first array element, which is 1.  gcc7
validly complains because the context in which it's used could
cause an out-of-bounds condition.

Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba
2017-10-11 06:03:41 -06:00
Jenkins2
5a8c148dcf Merge "res_pjsip_registrar.c: Update remove_existing AOR contact handling." into 13 2017-10-11 06:34:00 -05:00
Nathan Bruning
416e35589e app_queue.c: clear moh field in init_queue
ASTERISK-27301 #close

Change-Id: Ic31361f34e2de3b6470e68fc37205a7711082eba
2017-10-11 05:34:36 -05:00