Commit Graph

29372 Commits

Author SHA1 Message Date
George Joseph 01e9eaf3a6 pjproject_bundled: Add 3 upstream patches
0035-r5572-svn-backport-dialog-transaction-deadlock.patch
0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch
0037-r5576-svn-backport-session-timer-crash.patch

Also removed the progress bar from wget download to stdout.

ASTERISK-26905 #close
Reported-by: Ross Beer

Change-Id: I268fb3cf71a3bb24283ff0d24bd8b03239d81256
2017-04-05 17:17:24 -05:00
Troy Bowman fac5115c43 app_queue: Log reason for PAUSEALL/UNPAUSEALL
We needed the reason for our reporting when agents pause/unpause all of
their queues at once.  This is a small, simple patch that adds a reason
for PAUSEALL and UNPAUSEALL.  I have been using it in production for years.

ASTERISK-26920 #close

Change-Id: Ifb3f0d1a0abd5194253d9794023546e1395baf3d
2017-04-05 15:22:00 -05:00
George Joseph 40e9d5e8b7 sample_config: Add samples for pubsub to pjsip.conf.sample
Added:
 * outbound-publish
 * resource_list
 * inbound-publication
 * asterisk-publication

Change-Id: I65043a896c35483f30a92d30b5b118359af7ba5a
2017-04-05 14:53:20 -05:00
Richard Mudgett f2ee8ac21e res_pjsip_sdp_rtp.c: Don't alter global addr variable.
* create_rtp(): Fix unexpected alteration of global address_rtp if a
transport is bound to an address.

* create_rtp(): Fix use of uninitialized memory if the endpoint RTP media
address is invalid or the transport has an invalid address.

ASTERISK-26851

Change-Id: Icde42e65164a88913cb5c2601b285eebcff397b7
2017-04-04 13:38:07 -05:00
Corey Farrell 380973cc47 CDR: Protect from data overflow in ast_cdr_setuserfield.
ast_cdr_setuserfield wrote to a fixed length field using strcpy. This could
result in a buffer overrun when called from chan_sip or func_cdr. This patch
adds a maximum bytes written to the field by using ast_copy_string instead.

ASTERISK-26897 #close
patches:
  0001-CDR-Protect-from-data-overflow-in-ast_cdr_setuserfie.patch submitted
    by Corey Farrell (license #5909)

Change-Id: Ib23ca77e9b9e2803a450e1206af45df2d2fdf65c
2017-04-04 10:14:26 +00:00
Daniel Journo 6c3ae397cb Unused realtime MOH classes not purged on 'moh reload'
Purge Realtime MOH classes on 'moh reload' even when musiconhold.conf
hasn't changed.

ASTERISK-25974 #close

Change-Id: I42c78ea76528473a656f204595956c9eedcf3246
2017-04-03 17:43:50 -05:00
Corey Farrell 8e36064109 core: Improve/simplify handling of required headers.
* Report failures if configure finds a required header is missing.
* Deduplicate includes between asterisk.h, astmm.h and compat.h.
* Unconditionally include headers in compat.h if required elsewhere.

Change-Id: Ie67d0185ca71fbfb81c9bdfaebe46a49e3c56dc5
2017-04-03 16:16:09 -04:00
Richard Mudgett a889621b14 res_pjsip: Fix transport ref leak.
We were leaking a transport ref in multihomed_on_rx_message() which
resulted in the FRACK about excessive ref counts.

ASTERISK-26916 #close

Change-Id: I7a96658a9614a060565bb9ad51cb1c9c11ee145f
2017-04-03 14:03:24 -05:00
Mark Michelson cf4dd32bef Merge "sdp: Add support for setting connection address and clean up state." 2017-04-03 09:32:08 -05:00
Alexander Traud 4fc22c7673 chan_sip: Session Timers required but refused wrongly.
SIP user-agents indicate which protocol extensions are allowed in headers
like Supported and Required. Such protocol extensions are Session Timers
(RFC 4028) for example. Session Timers are supported since Mantis-10665.
Since ASTERISK-21721, not only the first but multiple Supported/Required
headers in a message are parsed. In that change, an existing variable was
re-used within a newly added do-loop. Currently, at the end of that loop,
that variable is an empty string always. Previously, that variable was used
within log output. However, the log output was not changed.

ASTERISK-26915 #close

Change-Id: I09315f31b4d78fb214bb2a9fb6c0f5e143eae990
2017-04-03 09:30:43 +02:00
zuul 9c80796d6f Merge "Forward declare 'struct ast_json' in asterisk.h" 2017-04-01 08:46:14 -05:00
Joshua Colp 48be02c5d8 res_pjsip_session: Allow BYE to be sent on disconnected session.
It is perfectly acceptable for a BYE to be sent on a disconnected
session. This occurs when we respond to a challenge to the BYE
for authentication credentials.

ASTERISK-26363

Change-Id: I6ef0ddece812fea6665a1dd2549ef44fb9d90045
2017-04-01 06:02:04 -05:00
Richard Mudgett e8b1bb3041 chan_vpb.cc: Fix compiler error.
Added missing channel technology read/write stream callback
initialization.

Change-Id: I829043a327d987e0d964485dd3d27964bebbd623
2017-03-31 13:14:05 -05:00
zuul 19e2a2802f Merge "cdr_pgsql: Fix buffer overflow calling libpq" 2017-03-31 09:01:23 -05:00
George Joseph 6a43a76ddc Merge "build: Fix deb build issues with fakeroot" 2017-03-31 08:20:30 -05:00
Corey Farrell f9695dc057 Forward declare 'struct ast_json' in asterisk.h
The ast_json structure is used in many Asterisk headers and is often the
only part of json.h used.  This adds a forward declaration to asterisk.h
and removes the include of json.h from many headers.  The declaration
has been left in endpoints.h and stasis.h to avoid problems with source
files that use ast_json functions without directly including json.h.

ari.h continues to include json.h as it uses enum
ast_json_encoding_format.

Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
2017-03-30 22:59:59 -05:00
zuul 0a06d39716 Merge "CEL: Remove header declarations of non-existant functions." 2017-03-30 18:29:09 -05:00
Sean Bright c537f99488 cdr_pgsql: Fix buffer overflow calling libpq
Implement the same buffer size checking done in cel_pgsql.

ASTERISK-26896 #close
Reported by: twisted

Change-Id: Iaacfa1f1de7cb1e9414d121850d2d8c2888f3f48
2017-03-30 17:48:42 -05:00
Walter Doekes a7d94f504f build: Fix deb build issues with fakeroot
If DESTDIR is set, don't call ldconfig. Assume that DESTDIR is used to
create a binary archive. The ldconfig call should be delegated to the
archive postinst script. This fixes the case where fakeroot wraps 'make
install' causing $EUID to be 0 even though it doesn't have permission to
call ldconfig.

The previous logic in configure.ac to detect and correct libdir
has been removed as it was not completely accurate.  CentOS 64-bit
users should again specifiy --libdir=/usr/lib64 when configuring
to prevent install to /usr/lib.

Updated Makefile:check-old-libdir to check for orphans in
lib64 when installing to lib as well as orphans in lib when installing
to lib64.

Updated Makefile and main/Makefile uninstall targets to remove the
orphans using the new logic.

ASTERISK-26705

Change-Id: I51739d4a03e60bff38be719b8d2ead0007afdd51
2017-03-30 17:10:32 -05:00
zuul 7898aad02d Merge "res_pjsip_config_wizard: Add 2 new parameters to help with proxy config" 2017-03-30 17:02:38 -05:00
Joshua Colp f3290d6b66 sdp: Add support for setting connection address and clean up state.
This change cleans up state management for media streams by moving
RTP instances into their own session structure and adding additional
details that are not relevant to the core (such as connection address).
These can live either in the local capabilities or joint capabilities.

The ability to set explicit connection address information for
the purposes of direct media and NAT has also been added at the
global and stream specific level.

ASTERISK-26900

Change-Id: If7e5307239a9534420732de11c451a2705b6b681
2017-03-30 18:26:10 +00:00
Sean Bright 5c1ea3ebbd astobj2: Prevent potential deadlocks with ao2_global_obj_release
The ao2_global_obj_release() function holds an exclusive lock on the
global object while it is being dereferenced. Any destructors that
run during this time that call ao2_global_obj_ref() will deadlock
because a read lock is required.

Instead, we make the global object inaccessible inside of the write
lock and only dereference it once we have released the lock. This
allows the affected destructors to fail gracefully.

While this doesn't completely solve the referenced issue (the error
message about not being able to create an IQ continues to be shown)
it does solve the backtrace spew that accompanied it.

ASTERISK-21009 #close
Reported by: Marcello Ceschia

Change-Id: Idf40ae136b5070dba22cb576ea8414fbc9939385
2017-03-30 13:59:11 -04:00
Corey Farrell 4e5cc70fb4 CEL: Remove header declarations of non-existant functions.
ast_cel_alloc and ast_cel_destroy do not exist in code, remove them from
the headers.

Change-Id: I99ce848e2e109e7d61771559f559b9e57973e45c
2017-03-30 10:21:04 -05:00
Joshua Colp 7ac5a33920 Merge "cel_pgsql.c: Fix buffer overflow calling libpq" 2017-03-30 05:12:11 -05:00
Joshua Colp 7581bb4f5f Merge "srtp: Allow zero as tag value for a sRTP Crypto Suite." 2017-03-29 17:49:55 -05:00
zuul 410a5ac0fa Merge "Add DTLS sanity check." 2017-03-29 16:11:12 -05:00
George Joseph 88a4c93e4c Merge "core: Remove embedded module support" 2017-03-29 14:40:36 -05:00
zuul 7c2f4601f2 Merge "channel: Remove old epoll support and fixed max number of file descriptors." 2017-03-29 12:45:47 -05:00
George Joseph 08210e851c Merge "alembic: Turn off execute bit on non-executable python scripts" 2017-03-29 11:32:38 -05:00
zuul 5a530171ca Merge "res_musiconhold: Don't chdir() when scanning MoH files" 2017-03-29 10:11:01 -05:00
Josh Roberson f66edcb8b0 cel_pgsql.c: Fix buffer overflow calling libpq
PQEscapeStringConn() expects the buffer passed in to be an
adequitely sized buffer to write out the escaped SQL value string
into.  It is possible, for large values (such as large values to
Dial with a lot of devices) to have more than our 512+1 byte
allocation and thus cause libpq to create a buffer overrun.

glibc will nicely ABRT asterisk for you, citing a stack smash.

Let's only allocate it to be as large as needed:
If we have a value, then (strlen(value) * 2) + 1 (as recommended
by libpq), and if we have none, just one byte to hold our null
will do.

ASTERISK-26896 #close

Change-Id: If611c734292618ed68dde17816d09dd16667dea2
2017-03-29 07:54:14 -06:00
Alexander Traud e76cc51d5e srtp: Allow zero as tag value for a sRTP Crypto Suite.
ASTERISK-25490 #close

Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
2017-03-29 15:04:05 +02:00
Joshua Colp f43cfb81d9 Merge "res_xmpp: Fix ref counting issue" 2017-03-29 06:57:49 -05:00
George Joseph 2fe52174de res_pjsip_config_wizard: Add 2 new parameters to help with proxy config
Two new parameters have been added to the pjsip config wizard.

 * Setting 'sends_line_with_registrations' to true will cause the wizard
   to skip the creation of an identify object to match incoming request
   to the endpoint and instead add the line and endpoint parameters to
   the outbound registration object.

 * Setting 'outbound_proxy' is a shortcut for adding individual
   endpoint/outbound_proxy, aor/outbound_proxy and
   registration/outbound_proxy parameters.

Change-Id: I678e5f80765734c056620528a6d40d82736ceeb0
(cherry picked from commit a827892ff7)
(cherry picked from commit 27344675be)
2017-03-28 15:51:21 -06:00
Joshua Colp d0ada2246e Merge "res_xmpp: Use incremental backoff when a read error occurs" 2017-03-28 16:46:52 -05:00
Sean Bright 7c0b12dc41 alembic: Turn off execute bit on non-executable python scripts
Change-Id: I744c986da4a38aeff8c00837eb89de7841fbc86c
2017-03-28 08:31:35 -06:00
Richard Mudgett 3d8899bacf Add DTLS sanity check.
Change-Id: Ib32612cf6c7ce9213a11b9cba82f630f8cd3564b
2017-03-27 15:43:03 -06:00
Joshua Colp 5d938045d4 channel: Remove old epoll support and fixed max number of file descriptors.
This change removes the old epoll support which has not been used or
maintained in quite some time.

The fixed number of file descriptors on a channel has also been removed.
File descriptors are now contained in a growable vector. This can be
used like before by specifying a specific position to store a file
descriptor at or using a new API call, ast_channel_fd_add, which adds
a file descriptor to the channel and returns its position.

Tests have been added which cover the growing behavior of the vector
and the new API call.

ASTERISK-26885

Change-Id: I1a754b506c009b83dfdeeb08c2d2815db30ef928
2017-03-27 19:54:44 +00:00
Sean Bright fd204d5c65 res_musiconhold: Document the 'format' option
ASTERISK-26086 #close
Reported by: Jens Bürger

Change-Id: I6aab666c0bf01fd0c64d7a5bcb22fa7f5d41335e
2017-03-27 08:36:32 -06:00
Sean Bright cf6a6226ab core: Remove embedded module support
This has not worked for some time and is no longer actively maintained.

Change-Id: I5110b0db69c152761b58fa025cb0a53b0e544d99
2017-03-27 10:36:08 -04:00
Sean Bright d22c678999 res_musiconhold: Don't chdir() when scanning MoH files
There doesn't appear to be any reason that we are chdir'ing in
moh_scan_files, and in the event of an Asterisk crash, the core files
may not get written because we have changed into a read-only directory.

ASTERISK-23996 #close
Reported by: Walter Doekes

Change-Id: Iac806dce01b3335963fbd62d4b4da9a65c614354
2017-03-27 08:00:57 -06:00
Joshua Colp 3bdf876b04 Merge "res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts" 2017-03-25 05:20:03 -05:00
Joshua Colp 772afa59dc Merge "cdr: Allow setting of user field from 'h' extension" 2017-03-24 18:02:12 -05:00
zuul 90634cc184 Merge "rtp_engine: allocate RTP dynamic payloads per session" 2017-03-24 16:22:55 -05:00
Sean Bright d5a8799c4b res_xmpp: Use incremental backoff when a read error occurs
If a read error occurs, we immediately attempt a reconnect without any
delay. Instead, let's sleep and backoff up to 60 seconds before we try
again.

ASTERISK-24712 #close
Reported by: Matthias Urlichs

Change-Id: I6fe10ef4734837727437beab715e336777f13f48
2017-03-24 15:11:39 -06:00
zuul cd9ca7cf87 Merge "pjproject_bundled: raise timeout value used when downloading" 2017-03-24 15:42:48 -05:00
zuul f27c1c7dc2 Merge "res_xmpp: Correct implementation of JABBER_STATUS & JabberStatus" 2017-03-24 12:25:07 -05:00
zuul 8982d0e007 Merge "res_xmpp: Include client name in connection related error messages" 2017-03-24 11:55:38 -05:00
Sean Bright d08c69a9e2 res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts
chan_sip sets the hangup cause code to AST_CAUSE_REQUESTED_CHAN_UNAVAIL
(44) when a channel is hung up due to an RTP timeout. So do the same
when it happens with PJSIP for parity.

Change-Id: I3546ebbde6460c22a27c9da1bf321711b5961ab8
2017-03-24 10:31:39 -06:00
Joshua Colp 6666deb907 Merge "res_xmpp: Don't crash when trying to send a message without a connection" 2017-03-24 10:46:34 -05:00