Commit Graph

30138 Commits

Author SHA1 Message Date
Joshua Colp
7b8f199a50 Merge "app_macro deprecation." 2017-10-18 19:22:12 -05:00
Corey Farrell
449ee66a11 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 14:37:57 -04:00
Corey Farrell
c9e19b31f5 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 13:04:29 -04:00
Corey Farrell
955a891a84 app_macro deprecation.
* Mark the module deprecated.
* Disable the module by default.
* Produce a warning the first time a macro is used.
* Note deprecation related options in app_dial and app_queue.

ASTERISK-27350

Change-Id: I560ea043bacdbc5534a17d97854273d52c2f1bdc
2017-10-18 09:54:58 -05:00
Alexander Traud
95b45d1c46 res_srtp: Add support for libsrtp2 with AES-GCM.
Beside allowing AES-GCM again, this adds AES-192 again.

ASTERISK-27356

Change-Id: Ia97a435faf26300335d9552fa676b5d17e5f7233
2017-10-18 03:34:56 -05:00
Jenkins2
214a40b6b5 Merge "res_corosync: Fix linking issue with Corosync 2.x" 2017-10-17 11:08:13 -05:00
Joshua Colp
206b66db55 Merge "cdr.c: Rename the Party A CDR container." 2017-10-17 11:06:16 -05:00
Jenkins2
203c8d6fa1 Merge "cdr.c: Add container to key off of Party B channel names." 2017-10-17 10:44:34 -05:00
Jenkins2
8495b373ad Merge "contrib/script/sip_to_pjsip: implement 'all' for allow/disallow" 2017-10-17 09:32:00 -05:00
Jenkins2
3f6e3221e3 Merge "bridge_simple: Improve renegotiation success rate." 2017-10-17 08:49:20 -05:00
Jenkins2
027ad49b08 Merge "chan_dahdi: wrap include file which is not present on BSD systems in #ifdef" 2017-10-17 08:21:12 -05:00
Jenkins2
c5d9cce6f6 Merge "res_pjsip_session: Rewrite o= with external_media_address." 2017-10-17 06:34:42 -05:00
Joshua Colp
5d8c517960 bridge_softmix: Reduce topology cloning and improve renegotiation.
As channels join and leave an SFU the bridge_softmix module
needs to renegotiate to add and remove their streams from
the other participants. Previously this was done by constructing
the ideal stream topology every time but in the case of leave
this was incomplete.

This change makes it so bridge_softmix keeps an ideal stream
topology for each channel and uses it when making changes. This
ensures that when we request a renegotiation we are always
certain that we are aiming for the best stream topology
possible. In the case of a channel leaving this ensures that
we try to have an existing participant fill their place if
a participant has a fixed limit on the maximum number of video
streams they allow.

ASTERISK-27354

Change-Id: I58070f421ddeadd2844a33b869b052630cf2e514
2017-10-17 05:45:40 -05:00
Richard Mudgett
73164d0d7f 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:26:17 -05:00
Richard Mudgett
fe1120cf88 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:26:17 -05:00
Jenkins2
3a2b132411 Merge "declare optional openssl dependencies in moduleinfo" 2017-10-16 09:19:56 -05:00
Torrey Searle
da24d425eb 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-16 06:26:16 -05:00
Joshua Colp
975d07248d Merge "cdr.c: Eliminated many calls to ao2_global_obj_ref()." 2017-10-16 05:45:11 -05:00
Joshua Colp
87123c90b2 Merge "cdr.c: Defer getting ao2_global_obj_ref() until needed." 2017-10-16 05:45:01 -05:00
Jenkins2
e08ac95e49 Merge "ast_bt_get_symbols: Prevent double-free." 2017-10-15 14:52:57 -05:00
Joshua Colp
8c09eeabce Merge "tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it." 2017-10-15 14:29:39 -05:00
Guido Falsi
c4f40b778a 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 14:36:07 +02:00
Alexander Traud
8f65d91dfd 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 12:57:03 +02:00
Jenkins2
89796eaef2 Merge "cdr.c: Set stringfields only if they are different." 2017-10-13 17:42:49 -05:00
Joshua Colp
7d51a79beb bridge_simple: Improve renegotiation success rate.
When making channels compatible the bridge_simple module
will renegotiate one to better match the other. Some
endpoints incorrectly terminate the call if this process
fails.

To better handle this scenario the audio streams present
on the new requested topology will include any existing
negotiated formats that happen to exist on the first
valid audio stream. This ensures formats are persent that
are known to be acceptable to the remote endpoint.

ASTERISK-27259

Change-Id: I8fc0cc03e8bcfd0be8302f13b9f32d8268977f43
2017-10-13 17:24:08 -05:00
Kevin Harwell
85bdfe2df7 Merge "cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr" 2017-10-13 17:11:53 -05:00
Corey Farrell
ee65d5ac7c 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 10:33:04 -05:00
Alexander Traud
44d9446eb5 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 15:12:07 +02:00
Richard Mudgett
f369be21a8 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:12:07 -05:00
Richard Mudgett
2eea087401 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:12:07 -05:00
Richard Mudgett
7c7a917874 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:12:07 -05:00
Richard Mudgett
c80c8f2ab9 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:12:07 -05:00
Thomas Sevestre
21c0283b78 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 13:31:34 -05:00
Jenkins2
acf686e6a5 Merge "res_pjsip_session: Prevent user=phone being added to anonimized URIs." 2017-10-12 12:51:03 -05:00
Jenkins2
6058b1ef3e Merge "sorcery: Use ao2_weakproxy to hold list of instances." 2017-10-12 11:25:12 -05:00
Daniel Tryba
6576e4320a 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:06:09 -05:00
Jenkins2
0b1b5849ce Merge "named_locks: Use ao2_weakproxy_find." 2017-10-12 10:16:45 -05:00
Jenkins2
b94f2343a6 Merge "astobj2: Add ao2_weakproxy_find function." 2017-10-12 09:26:29 -05:00
Jenkins2
3affeac39d Merge "astobj2: Run weakproxy callbacks outside of lock." 2017-10-12 09:02:47 -05:00
Joshua Colp
620b402974 Merge "cdr.c: Defer misc checks." 2017-10-12 08:02:36 -05:00
Jenkins2
292cda4ee7 Merge "res_pjsip: Prevent "user=phone" being added multiple times to header" 2017-10-12 07:03:59 -05:00
Jenkins2
c7c5f5a66c Merge "cdr_mysql: avoid releasing a config string" 2017-10-11 19:12:56 -05:00
Joshua Colp
f9e7793411 Merge "chan_vpb: Fix a gcc 7 out-of-bounds complaint" 2017-10-11 17:06:17 -05:00
Joshua Colp
0bedd436dc Merge "app_originate: Set ORIGINATE_STATUS correctly on failure" 2017-10-11 16:03:21 -05:00
Daniel Tryba
a56316423f 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 15:36:28 -05:00
Richard Mudgett
e5b9eb0460 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:51 -05:00
Jenkins2
45756b490e Merge "cdr.c: Eliminated simple RAII_VAR usages." 2017-10-11 12:04:09 -05:00
Jenkins2
9b1bc73db5 Merge "ari/bridge: Add mute, dtmf suppression controls" 2017-10-11 11:34:08 -05:00
Jenkins2
832efb4a41 Merge "app_queue.c: clear moh field in init_queue" 2017-10-11 11:30:46 -05:00
Seán C McCord
e8bde6916a ari/bridge: Add mute, dtmf suppression controls
Add bridge_features structure to bridge creation.  Specifically, this
implements mute and DTMF suppression, but others should be able to be
easily added to the same structure.

ASTERISK-27322 #close
Reported by: Darren Sessions
Sponsored by: AVOXI

Change-Id: Id4002adfb65c9a8027ee9e1a5f477e0f01cf9d61
2017-10-11 08:23:05 -04:00