Commit Graph

30232 Commits

Author SHA1 Message Date
Joshua Colp
2b25fdb80c Merge "res_crypto: Allow OpenSSL configured with no-deprecated." into 13 2018-06-12 08:28:16 -05:00
Jenkins2
e46ab4743b Merge "res_srtp: Repair ./configure --with-ssl=PATH." into 13 2018-06-12 07:45:19 -05:00
Jenkins2
6fa33215ef Merge "func_odbc: NODATA if SQLNumResultCols returned 0 columns on readsql" into 13 2018-06-12 07:36:15 -05:00
Jenkins2
867a23e267 Merge "chan_pjsip: Register for "BEFORE_MEDIA" responses" into 13 2018-06-11 18:05:10 -05:00
Richard Mudgett
034a04af2a AST-2018-008: Fix enumeration of endpoints from ACL rejected addresses.
When endpoint specific ACL rules block a SIP request they respond with a
403 forbidden.  However, if an endpoint is not identified then a 401
unauthorized response is sent.  This vulnerability just discloses which
requests hit a defined endpoint.  The ACL rules cannot be bypassed to gain
access to the disclosed endpoints.

* Made endpoint specific ACL rules now respond with a 401 unauthorized
which is the same as if an endpoint were not identified.  The fix is
accomplished by replacing the found endpoint with the artificial endpoint
which always fails authentication.

ASTERISK-27818

Change-Id: Icb275a54ff8e2df6c671a6d9bda37b5d732b3b32
2018-06-11 10:26:37 -05:00
Alexander Traud
7763aa824e res_crypto: Allow OpenSSL configured with no-deprecated.
The header <openssl/rsa.h> had to be included explicitly.

ASTERISK-27906

Change-Id: I41743801eed998c039d73db7a0762d104a4f75b2
2018-06-08 11:06:44 +02:00
Alexander Traud
e62e069705 res_srtp: Repair ./configure --with-ssl=PATH.
ASTERISK-27905

Change-Id: Ibb7dc148a0048f4f9c3b12937ba4240dff0d15e2
2018-06-08 01:43:33 -06:00
Alexei Gradinari
d9d50396cf func_odbc: NODATA if SQLNumResultCols returned 0 columns on readsql
The functions acf_odbc_read/cli_odbc_read ignore a number of columns
returned by the SQLNumResultCols.
If the number of columns is zero it means no data.
In this case, a SQLFetch function has to be not called,
because it will cause an error.

ASTERISK-27888 #close

Change-Id: Ie0f7bdac6c405aa5bbd38932c7b831f90729ee19
2018-06-07 10:29:59 -04:00
George Joseph
98da1971e3 chan_pjsip: Register for "BEFORE_MEDIA" responses
chan_pjsip wasn't registering for "BEFORE_MEDIA" responses which meant
it was not updating HANGUPCAUSE for 4XX responses.  If the remote end
sent a "180 Ringing", then a "486 Busy", the hangup cause was left at
"180 Normal Clearing".

* Removed chan_pjsip_incoming_response from the original session
  supplement (which was handling only "AFTER MEDIA") and added it to a
  new session supplement which accepts both "BEFORE_MEDIA" and
  "AFTER_MEDIA".

* Also cleaned up some cleanup code in load module.

ASTERISK-27902

Change-Id: If9b860541887aca8ac2c9f2ed51ceb0550fb007a
2018-06-07 07:56:00 -06:00
Alexander Traud
1205bcb69f ooh323c: GCC 8.1 warned about output truncated before terminating nul.
ASTERISK-27901

Change-Id: I5a8e894f4924ef52e3094f6870656a559d67f3d7
2018-06-07 06:20:36 -06:00
Joshua Colp
19f8f85689 Merge "pjsip_options: handle modification of qualify options in realtime" into 13 2018-06-06 11:21:38 -05:00
George Joseph
8b6c84787c Merge "pjsip_options: show/reload AOR qualify options using CLI" into 13 2018-06-06 10:10:40 -05:00
George Joseph
499867d006 Merge "app_confbridge: Add talking indicator for ConfBridgeList AMI response" into 13 2018-06-06 09:46:29 -05:00
Joshua Colp
b5a186d723 Merge "bridge_channel.c: Fix Deadlock when using Local channels and fax gateway" into 13 2018-06-06 05:46:28 -05:00
George Joseph
8dbd3d2b05 Merge "tcptls: Allow OpenSSL configured with no-dh." into 13 2018-06-05 14:22:35 -05:00
George Joseph
a938f49bc5 Merge "tcptls.h: Repair ./configure --with-ssl=PATH." into 13 2018-06-05 14:20:38 -05:00
George Joseph
93a85150e1 Merge "tcptls: Allow OpenSSL 1.1.x configured with enable-ssl3-method no-deprecated." into 13 2018-06-05 13:01:08 -05:00
Joshua Colp
f17d09ae63 Merge "app_meetme: Fix manager event documentation for several events." into 13 2018-06-05 06:53:33 -05:00
George Joseph
db2413b446 app_sendtext: Allow content types other than text/plain
There was no real reason to limit the conteny type to text/plain other
than that's what it was limited to before.  Now any text/* content
type will be allowed for channel drivers that don't support enhanced
messaging and any type will be allowed for channel drivers that do
support enhanced messaging.

Change-Id: I94a90cfee98b4bc8e22aa5c0b6afb7b862f979d9
2018-06-04 13:19:52 -06:00
Pirmin Walthert
8b67e2bd14 bridge_channel.c: Fix Deadlock when using Local channels and fax gateway
ast_indicate is invoked with the bridge locked. As ast_indicate locks the
other end of the bridge as well this can lead to a deadlock in some situations.
(Especially when a different thread does the same in the reverse order).
This patch calls ast_indicate after unlocking the bridge which fixes the
deadlock. Calling ast_indicate with these parameters without locking the
bridge should be safe as this is done at different places without a
bridge lock.

ASTERISK-27094 #close
Reported-by: David Brillert

Change-Id: I5f86c1e2ce75b9929a36ab589b18c450e62ea35f
2018-06-01 14:24:59 -06:00
William McCall
9ff4779f03 app_confbridge: Add talking indicator for ConfBridgeList AMI response
When an AMI client connects, it cannot determine if a user was talking
prior to a transition in the user speaking state (which would generate
a ConfbridgeTalking event). This patch causes app_confbridge to track the
talking state and make this state available via ConfBridgeList.

ASTERISK-27877 #close

Change-Id: I19b5284f34966c3fda94f5b99a7e40e6b89767c6
2018-06-01 05:34:06 +00:00
Joshua Colp
a385467a35 Merge "ast_coredumper: Fix output directory and variable precedence" into 13 2018-05-31 05:15:57 -05:00
Richard Mudgett
071232244a app_meetme: Fix manager event documentation for several events.
The MeetmeJoin, MeetmeLeave, MeetmeEnd, MeetmeMute, MeetmeTalking, and
MeetmeTalkRequest AMI events were documented with sending out a Usernum
header when the User header was actually output.

* Change the online documentation to match reality.

ASTERISK-27873
ASTERISK-25261

Change-Id: I437bc70618d07c183c9624b7069c2fcae7f17a39
2018-05-29 12:38:13 -05:00
Joshua Colp
369e611ac0 Merge "libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated." into 13 2018-05-29 12:07:39 -05:00
Alexander Traud
8c78337479 tcptls.h: Repair ./configure --with-ssl=PATH.
asterisk/tcptls.h was included (explicitly, implicitly, or transitively). Those
inclusions got replaced by forward declarations. As side effect, the inclusions
got completed.

ASTERISK-27878

Change-Id: I9d102728e30336d6522e5e4ae9e964013a0835f7
2018-05-28 17:32:15 +02:00
Alexei Gradinari
9ad3918acd pjsip_options: handle modification of qualify options in realtime
Currentrly pjsip_options code does not handle the situation when the
qualify options were changed in realtime database.
Only 'module reload res_pjsip' helps.

This patch add a check on contact add/update observers if the contact
qualify options are different than local aor qualify options.
If the qualify options were modified then synchronize
the pjsip_options AOR local state.

ASTERISK-27872

Change-Id: Id55210a18e62ed5d35a88e408d5fe84a3c513c62
2018-05-25 18:01:42 -04:00
Alexander Traud
6833c763c7 tcptls: Allow OpenSSL configured with no-dh.
Additionally, this change allows auto-negotiation of the elliptic curve/group
for servers, not only with OpenSSL 1.0.2 but also with OpenSSL 1.1.0 and newer.
This enables X25519 (since OpenSSL 1.1.0) and X448 (since OpenSSL 1.1.1) as a
side-effect.

ASTERISK-27876

Change-Id: I62c2aba4a630aefc231b71f646207e8c027d9497
2018-05-25 08:56:46 -06:00
Alexander Traud
204cc25a27 tcptls: Allow OpenSSL 1.1.x configured with enable-ssl3-method no-deprecated.
ASTERISK-27874

Change-Id: Ica65113511c7a1c13f7988e7d9e7d9e7f3f620dd
2018-05-25 14:24:51 +02:00
Joshua Colp
7f318c3ab5 Merge "res/res_rtp_asterisk: ensure marker bit is correctly set on ssrc change" into 13 2018-05-24 14:55:59 -05:00
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
Torrey Searle
4b7fd478d5 res/res_rtp_asterisk: ensure marker bit is correctly set on ssrc change
Certain race conditions between changing bridge types and DTMF can
cause the current FLAG_NEED_MARKER_BIT to send the marker bit before
the actual first packet of native bridging.

This logic keeps track of the ssrc the bridge is currently sending
and will correctly ensure the marker bit is set if SSRC as changed
from the previous sent packet.

ASTERISK-27845

Change-Id: I01858bd0235f1e5e629e20de71b422b16f55759b
2018-05-23 20:13:57 -06:00
Alexei Gradinari
a576f50362 pjsip_options: show/reload AOR qualify options using CLI
Currentrly pjsip_options code does not handle the situation when the
AOR qualify options were changed.

Also there is no way to find out what qualify options are using.

This patch add CLI commands to show and synchronize Aor qualify options:
pjsip show qualify endpoint <id>
    Show the current qualify options for all Aors on the PJSIP endpoint.
pjsip show qualify aor <id>
    Show the PJSIP Aor current qualify options.
pjsip reload qualify endpoint <id>
    Synchronize the qualify options for all Aors on the PJSIP endpoint.
pjsip reload qualify aor <id>
    Synchronize the PJSIP Aor qualify options.

ASTERISK-27872

Change-Id: I1746d10ef2b7954f2293f2e606cdd7428068c38c
2018-05-23 17:33:01 -04: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
ec40bd945c libasteriskssl: Allow OpenSSL 1.0.2 configured with no-deprecated.
Use CRYPTO_set_id_callback(.) only with OpenSSL 0.9.8 and older.

ASTERISK-27867

Change-Id: Iadd58d5bf6f538eb224203970a4e88e26f259655
2018-05-20 13:53:19 +02: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