Commit Graph

28761 Commits

Author SHA1 Message Date
zuul
b82f58d2bf Merge "pjsip: Add Alembic for PUBLISH support." into 13 2017-04-07 14:50:03 -05:00
zuul
293f9d39b7 Merge "samples: Canonicalize app names in extensions.conf.sample." into 13 2017-04-07 08:50:06 -05:00
Joshua Colp
b3f4a6365e pjsip: Add Alembic for PUBLISH support.
This change adds database tables for the PUBLISH support so it
can be configured using realtime. A minor fix to the
res_pjsip_publish_asterisk module was done so that it read the
sorcery configuration from the correct section. Finally the
sample configuration files have been updated.

ASTERISK-26928

Change-Id: I81991ae5c75af98d247f7eacd1c0b0a763675952
2017-04-07 13:38:14 +00:00
Joshua Colp
09ec2dbbf3 Merge "chan_sip: Session Timers required but refused wrongly." into 13 2017-04-06 11:01:16 -05:00
Joshua Colp
0b00df55fc Merge "pjproject_bundled: Add 3 upstream patches" into 13 2017-04-06 10:49:16 -05:00
Joshua Colp
4b504544f6 Merge "sample_config: Add samples for pubsub to pjsip.conf.sample" into 13 2017-04-06 08:29:43 -05:00
Joshua Colp
1a35801994 Merge "Unused realtime MOH classes not purged on 'moh reload'" into 13 2017-04-06 04:31:33 -05:00
Joshua Colp
f80b7f7014 Merge "res_pjsip_session: Allow BYE to be sent on disconnected session." into 13 2017-04-05 17:50:28 -05:00
George Joseph
4e6e069491 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 16:16:42 -06:00
George Joseph
d2a33cdedc 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 13:50:40 -06:00
Walter Doekes
ab9d2fc86d samples: Canonicalize app names in extensions.conf.sample.
This takes care of warnings by ossobv/asterisklint.

Change-Id: Ia79aea64de89531362e993e34230c2044a70aa93
2017-04-05 16:10:42 +02:00
Richard Mudgett
6906765381 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 10:26:11 -05:00
Corey Farrell
68bde0f07d 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:12:27 +00:00
Daniel Journo
70e5a2655d 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 23:29:50 +01:00
Richard Mudgett
27b556778d 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:02:23 -05:00
Alexander Traud
94bd529f9e 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 02:43:51 -05:00
zuul
365db26535 Merge "Forward declare 'struct ast_json' in asterisk.h" into 13 2017-04-01 08:20:50 -05:00
Joshua Colp
bca9685d39 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 10:58:41 +00:00
George Joseph
01c1e60a4f Merge "build: Fix deb build issues with fakeroot" into 13 2017-03-31 08:19:53 -05:00
zuul
eb03c75f58 Merge "cdr_pgsql: Fix buffer overflow calling libpq" into 13 2017-03-31 07:05:27 -05:00
Corey Farrell
c701550803 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:54:01 -05:00
zuul
f040eb0502 Merge "CEL: Remove header declarations of non-existant functions." into 13 2017-03-30 18:39:19 -05:00
Sean Bright
754e99d517 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 18:45:18 -04:00
George Joseph
0667febf3d Merge "res_pjsip_config_wizard: Add 2 new parameters to help with proxy config" into 13 2017-03-30 17:16:47 -05:00
Walter Doekes
7954b39a50 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 16:09:40 -06:00
Sean Bright
c9648f4690 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:49:49 -04:00
Joshua Colp
1d1309b1ed Revert "Update for 13.15.0-rc1"
This reverts commit 552cf009c0.

Change-Id: Ie345bea481261b761c44079e9472622040fda302
2017-03-30 17:01:49 +00:00
Corey Farrell
3c23ebdef4 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 11:18:38 -04:00
Joshua Colp
e52ced02d8 Merge "cel_pgsql.c: Fix buffer overflow calling libpq" into 13 2017-03-30 05:11:14 -05:00
Joshua Colp
5d3db15d2e Merge "srtp: Allow zero as tag value for a sRTP Crypto Suite." into 13 2017-03-29 19:00:47 -05:00
George Joseph
8e0d8cdf08 Merge "Add DTLS sanity check." into 13 2017-03-29 14:39:15 -05:00
zuul
354c69699c Merge "core: Remove embedded module support" into 13 2017-03-29 12:46:04 -05:00
Joshua Colp
de2a202e56 Merge "alembic: Turn off execute bit on non-executable python scripts" into 13 2017-03-29 10:15:36 -05:00
Alexander Traud
ef19db9261 srtp: Allow zero as tag value for a sRTP Crypto Suite.
ASTERISK-25490 #close

Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
2017-03-29 15:27:01 +02:00
Joshua Colp
95c66234ba Merge "res_musiconhold: Don't chdir() when scanning MoH files" into 13 2017-03-29 08:15:00 -05:00
Joshua Colp
b0a1e40542 Merge changes from topic 'ASTERISK-24712' into 13
* changes:
  res_xmpp: Use incremental backoff when a read error occurs
  res_xmpp: Try to provide useful errors messages from OpenSSL
  res_xmpp: Correctly check return value of SSL_connect
2017-03-28 18:04:13 -05:00
zuul
92517fc6a7 Merge "res_xmpp: Fix ref counting issue" into 13 2017-03-28 17:58:58 -05:00
George Joseph
a827892ff7 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
2017-03-28 15:44:07 -06:00
Sean Bright
864dda07f3 alembic: Turn off execute bit on non-executable python scripts
Change-Id: I744c986da4a38aeff8c00837eb89de7841fbc86c
2017-03-28 10:29:25 -04:00
Richard Mudgett
a9529cbb21 Add DTLS sanity check.
Change-Id: Ib32612cf6c7ce9213a11b9cba82f630f8cd3564b
2017-03-27 16:42:09 -05:00
Josh Roberson
bb68f57a03 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-27 15:51:44 -04:00
Sean Bright
79a2c26c03 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:23 -04:00
Sean Bright
2c28f7a922 res_musiconhold: Document the 'format' option
ASTERISK-26086 #close
Reported by: Jens Bürger

Change-Id: I6aab666c0bf01fd0c64d7a5bcb22fa7f5d41335e
2017-03-27 10:35:15 -04:00
Sean Bright
61fd70c250 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 09:58:17 -04:00
Sean Bright
73bb08fd6a 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-25 12:01:28 -04:00
Sean Bright
55693383e2 res_xmpp: Fix ref counting issue
The only remaining reference to the endpoint is in the endpoints
container, and because it is unlinked in ast_endpoint_shutdown, we don't
have to explicitly cleanup the endpoint ourselves.

Change-Id: I912a2692e52d3e2ed445b32d8ae3f9004bc2f2e8
2017-03-25 12:01:28 -04:00
Sean Bright
1966265562 res_xmpp: Try to provide useful errors messages from OpenSSL
If any errors occur during the TLS connection setup, we currently dump a
fairly generic error message. So instead we try to pull in something
useful from OpenSSL to report instead.

ASTERISK-24712
Reported by: Matthias Urlichs

Change-Id: I288500991a9681f447d92913b11fedaf426087f4
2017-03-25 12:01:28 -04:00
Sean Bright
03b99ae3d2 res_xmpp: Correctly check return value of SSL_connect
SSL_connect returns non-zero for both success and some error conditions
so simply negating is inadequate.

Change-Id: Ifbf882896e598703b6c615407fa456d3199f95b1
2017-03-25 12:01:28 -04:00
zuul
39fff2ebf9 Merge "res_pjsip_sdp_rtp: Set hangup cause for RTP timeouts" into 13 2017-03-24 19:21:51 -05:00
Joshua Colp
ddbff36c12 Merge "res_xmpp: Correct implementation of JABBER_STATUS & JabberStatus" into 13 2017-03-24 17:45:52 -05:00