Commit Graph

28295 Commits

Author SHA1 Message Date
Joshua Colp
5d32617a25 Merge "pbx.c: Additional fixes to ast_context_remove_extension_callerid2." into 14 2016-08-16 05:33:23 -05:00
zuul
01083e87e2 Merge "func_channel: Reorganize documentation" into 14 2016-08-16 01:21:15 -05:00
zuul
b8b9cee272 Merge "manager: Add <see-also> tags to relate UserEvent actions/apps/events" into 14 2016-08-15 23:04:33 -05:00
zuul
4b46e440df Merge "manager: Add <see-also> tags to relate Bridge related events,actions, and apps" into 14 2016-08-15 19:16:46 -05:00
zuul
cb6b69b53e Merge "manager: Add <see-also> tags to relate interrelated events/actions together" into 14 2016-08-15 18:48:53 -05:00
zuul
709f5f5bd4 Merge "app_dial: Improve documentation" into 14 2016-08-15 17:04:24 -05:00
Corey Farrell
f7f9081f7a pbx.c: Additional fixes to ast_context_remove_extension_callerid2.
Do not check registrar of the first extension head.  We should only check
the registrar when we match the priority.

Additionally fix a couple calls to strcmp which used the input callerid
instead of the clean version ex.cidmatch.

ASTERISK-26233

Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1
2016-08-15 11:12:42 -05:00
Matt Jordan
7c46e3bfbb app_dial: Improve documentation
* Add some helpful <literal> and other embedded paragraph tags

* Document some of the lesser known channel variables set by Dial

* Add examples for some common Dial uses, along with some more
  challenging but useful options

Change-Id: Ib2fb9301e8e044d14fbb2815ec64161f19bbfbc1
2016-08-15 07:42:40 -05:00
Matt Jordan
2e77b973fb manager: Add <see-also> tags to relate interrelated events/actions together
Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4
2016-08-15 07:41:32 -05:00
Matt Jordan
18065140d5 manager: Add <see-also> tags to relate Bridge related events,actions, and apps
Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85
2016-08-15 07:41:01 -05:00
Matt Jordan
c5574667c7 manager: Add <see-also> tags to relate UserEvent actions/apps/events
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4
2016-08-15 07:40:31 -05:00
Matt Jordan
89dccb04bc func_channel: Reorganize documentation
* Following the example of the PJSIP channel driver, the channel
  technology specific documentation has been moved to the respective
  channel drivers that provide that functionality. This has the benefit
  of locating the documentation of items with those modules that provide
  it.

* Examples of using the CHANNEL function for both standard items as well
  as for PJSIP have been added.

* The 'max_forwards' standard item has been documented.

Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b
2016-08-15 07:39:12 -05:00
Joshua Colp
2ce487585e manager: Clarify that dialplan manipulation actions are under system class.
ASTERISK-26246 #close

Change-Id: Id673b9786389f9d2a87f638ce1a25161f5f31657
2016-08-15 07:34:19 -05:00
zuul
0bb8366580 Merge "res_pjsip: Fail global load if debug or default_from_user are empty" into 14 2016-08-12 18:49:52 -05:00
zuul
f771e284eb Merge "res_pjsip_caller_id: Copy header name to short header name" into 14 2016-08-12 14:14:04 -05:00
zuul
906d0e72e1 Merge "Run mandatory cleanup when startup fails." into 14 2016-08-12 13:59:44 -05:00
zuul
488ea6b865 Merge "location.c: Misc fixes and cleanups." into 14 2016-08-12 12:06:13 -05:00
Joshua Colp
2153309241 Merge "app_queue: Prevent crash when a call is forwarded to an invalid location" into 14 2016-08-12 09:34:45 -05:00
Joshua Colp
7a6f943bf2 Merge "alembic: add auth_username to endpoint's identify_by enum" into 14 2016-08-12 04:47:07 -05:00
Joshua Colp
a4ba3d2b52 Merge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups." into 14 2016-08-12 04:46:29 -05:00
zuul
15540119c0 Merge "pjsip_distributor.c: Add missing allocation failure check." into 14 2016-08-12 03:22:29 -05:00
zuul
d003057ff5 Merge "res_pjsip: Make aor named lock a mutex." into 14 2016-08-11 23:14:42 -05:00
Corey Farrell
03b80c5d27 Run mandatory cleanup when startup fails.
Errors during startup result in an exit.  These error branches should be
calling ast_run_atexit(0) to ensure mandatory cleanup is run.

ASTERISK-26267 #close

Change-Id: If226f2326ae2df7add20040696132214cf2bb680
2016-08-11 23:12:32 -04:00
zuul
6092514405 Merge "taskprocessor.c: Tweak high water checks." into 14 2016-08-11 21:17:56 -05:00
zuul
ef3973f57f Merge "res_odbc: Show only when there a fail attempt of connection in CLI" into 14 2016-08-11 21:17:54 -05:00
Joshua Colp
cf48c672af Merge "cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers" into 14 2016-08-11 19:42:09 -05:00
Joshua Colp
968e78f9be Merge "autohints: Update CHANGES and extensions.conf.sample" into 14 2016-08-11 16:10:36 -05:00
George Joseph
33952469f2 res_pjsip_caller_id: Copy header name to short header name
When compact_headers was set, we were sending a zero-length header name
for PAI and RPID because we always forced the short header name length
to 0.  We did this because we cloned the header from "From" and wanted
to clear "f" from the sname.  By cloning however, we bypass pjproject's
automatic logic that sets sname to name if there's no compact form of
the header, which there isn't for PAI and RPID.  So now we force sname
to be the same as name right after we set name.

res_pjsip_diversion needed the same treatment for the Diversion header.

ASTERISK-26241 #close

Change-Id: I633ec139630cd83809aae00336cee4a10077e467
2016-08-11 14:17:36 -05:00
zuul
8071c3d04e Merge "Fixed compile flags for non-module libs" into 14 2016-08-11 14:08:52 -05:00
Matt Jordan
82529ae4e6 app_queue: Prevent crash when a call is forwarded to an invalid location
When a call forward attempt is made from a Queue member, the current
code will hang up the forwarding channel in an off-nominal condition
prior to raising the Stasis events informing the rest of Asterisk that
the call was forwarded. This will result in a slew of dreaded FRACKs,
most likely leading to a crash.

This patch modifies the code such that we don't hang up the forwarding
channel even in an off-nominal condition until we've safely raised the
Stasis messages.

ASTERISK-25797 #close

Change-Id: Ife5abed351691fd79105321636eaa8ea8dcdba38
2016-08-11 13:56:12 -05:00
George Joseph
2db2d9dbd3 res_pjsip: Fail global load if debug or default_from_user are empty
If debug was specified in the global configuration but left blank,
the logger would treat it as a wildcard and log all hosts.  If
default_from_user was empty, a crash would result.

The global apply handler now checks for empty strings.

ASTERISK-26239 #close
ASTERISK-26238 #close

Change-Id: Ie75727f5cd5808845d92cc81f5713842fb203336
2016-08-11 12:33:07 -05:00
zuul
ef7361659f Merge "res_resolver_unbound: Allow compilation with libunbound version < 1.5" into 14 2016-08-11 12:30:19 -05:00
Richard Mudgett
63863ed0f3 res_pjsip res_pjsip_mwi: Misc fixes and cleanups.
* Eliminated RAII_VAR() usage in
ast_sip_persistent_endpoint_update_state().

* Added a missing allocation failure check to
persistent_endpoint_find_or_create().

* Made persistent_endpoint_find_or_create() create the new object without
a lock as it isn't needed.

* Cleaned up some ao2 container allocation idioms.

* Reordered res_pjsip_mwi.c load_module() and unload_module()

Change-Id: If8ce88fbd82a0c72a37a2388f74f77237a6a36a8
2016-08-11 12:17:34 -05:00
Richard Mudgett
ab45dfaeb9 location.c: Misc fixes and cleanups.
* Eliminated most RAII_VAR() usage.

* Added several missing allocation failure checks.

* Made ast_sip_for_each_contact() allocate the wrapper ao2 object without
a lock as it is not needed.

Change-Id: Ie20913365156c95dd79e5d471cfd25e99ae880bc
2016-08-11 12:13:41 -05:00
George Joseph
96887cc110 autohints: Update CHANGES and extensions.conf.sample
Make it clear that we're talking about device state hints and add
an entry to the sample config.

Change-Id: Iaef58ffb960191a21b713e8e0b51ce1fcd47e433
2016-08-11 11:01:33 -06:00
Richard Mudgett
7f9789fc39 taskprocessor.c: Tweak high water checks.
* The high water check in ast_taskprocessor_alert_set_levels() would
trigger immediately if the new high water level is zero and the queue was
empty.

* The high water check in taskprocessor_push() was off by one.

Change-Id: I687729fb4efa6a0ba38ec9c1c133c4d407bc3d5d
2016-08-11 11:59:58 -05:00
Richard Mudgett
94ff684388 res_pjsip: Make aor named lock a mutex.
The named aor lock was always being locked for writes so a rwlock adds no
benefit and may be slower because rwlocks are biased toward read locking.

Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28
2016-08-11 11:58:25 -05:00
Richard Mudgett
31a1b066ee pjsip_distributor.c: Add missing allocation failure check.
Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28
2016-08-11 11:57:10 -05:00
zuul
b08497c048 Merge "channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH" into 14 2016-08-11 11:43:20 -05:00
Kevin Harwell
112de90576 alembic: add auth_username to endpoint's identify_by enum
A new identify_by option was added recently, auth_username. However, this
setting was not added as an allowable choice in the database enumeration
value.

This patch updates the current enumeration, adding in the new setting.

ASTERISK-26268 #close

Change-Id: Ib4788e8485e4cd40172ec0abbf5810a147ab8bf8
2016-08-11 10:59:26 -05:00
David M. Lee
919824ebbc Fixed compile flags for non-module libs
The non-module libs libasteriskssl.dylib and libasteriskpj.dylib have
long been missing the AST_NOT_MODULE compile flag. This was mostly
okay, until a recent fix to improve compiler warnings when the
AST_MODULE_SELF_SYM is missing broke the build on OS X/macOS/whatever
they are calling it these days.

Change-Id: I2cb51c890824f001280a5114f2e775f97c163516
2016-08-11 10:50:09 -05:00
Joshua Colp
01c49ac889 Merge "res_srtp: Move SDP SRTP code from the core to res_srtp." into 14 2016-08-11 06:20:38 -05:00
zuul
9c5bc68e0f Merge "alembic/sqlalchemy: auto increment only allowed on a single column" into 14 2016-08-10 20:26:06 -05:00
Richard Mudgett
34d366eb0c res_srtp: Move SDP SRTP code from the core to res_srtp.
A patch made to the master branch (Now the 14 branch) inadvertently made
libsrtp a required dependency in order to compile Asterisk.  Rather than
create dummy defines to substitute for the defines supplied by libsrtp
when libsrtp is not available, most of the code in sdp_srtp.c is moved
into res_srtp.c.  This gets more code out of Asterisk's core that isn't
used when SRTP is not available.  This also makes another inadvertent
required dependency on libsrtp by Asterisk's core unlikely.

ASTERISK-26253 #close
Reported by: Ben Merrills

Change-Id: I0a46cde81501c0405399c2588633ae32706d1ee7
2016-08-10 17:32:42 -05:00
Alexei Gradinari
ecad35e147 pjsip: Fix deadlock with suspend taskprocessor on masquerade
If both channels which should be masqueraded
are in the same serializer:
1st channel will be locked waiting condition 'complete'
2nd channel will be locked waiting condition 'suspended'

On heavy load system a chance that both channels will be in
the same serializer 'pjsip/distibutor' is very high.

To reproduce compile res_pjsip/pjsip_distributor.c with
DISTRIBUTOR_POOL_SIZE=1

Steps to reproduce:
1. Party A calls Party B (bridged call 'AB')
2. Party B places Party A on hold
3. Party B calls Voicemail app (non-bridged call 'BV')
4. Party B attended transfers Party A to voicemail using REFER.
5. When asterisk masquerades calls 'AB' and 'BV',
   a deadlock is happened.

This patch adds a suspension indicator to the taskprocessor.
When a session suspends/unsuspends the serializer
it sets the indicator to the appropriate state.
The session checks the suspension indicator before
suspend the serializer.

ASTERISK-26145 #close

Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b
2016-08-10 15:14:56 -05:00
Kevin Harwell
223b7756a6 alembic/sqlalchemy: auto increment only allowed on a single column
The extensions table defined two columns (id and priority) as primary key
autoincrement columns. However only one is allowed when defining the primary
key.

This patch removes the autoincrement attribute from the priority column since
it does not need to be as such and really should not have been on there in the
first place.

This patch also removes 'context', 'exten', and 'priority' from the primary key
index and creates a new combined unique contraint index on them.

ASTERISK-26183 #close

Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
2016-08-10 13:50:20 -05:00
George Joseph
a8512f9afe res_resolver_unbound: Allow compilation with libunbound version < 1.5
libunbound at version 1.4.20 (which CentOS still uses) declared all
of their string function parameters as as 'char *'.  1.4.21 changed
them all to 'const char *'.  Thankfully 1.4.21 also introduced the
UNBOUND_VERSION_MAJOR define so configure now checks for that and
sets HAVE_UNBOUND_CONST_PARAMS.  res_resolver_unbound then checks
that and casts away the 'const' if it's not set.

Tested compile and testsuite on CentOS6 (1.4.20), Ubuntu14 (1.4.22) and
Fedora24 (1.5.4).  There are a few failing tests to be addressed though.

ASTERISK-26283 #close

Change-Id: Ib708b19b706c5d0ba7b7d5473e6df339d9ae4148
2016-08-10 11:08:25 -06:00
Matt Jordan
eec60dd773 channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH
This patch adds a new PJSIP specific dialplan function,
PJSIP_SEND_SESSION_REFRESH. When invoked on a PJSIP channel, the media
session will be refreshed via either an UPDATE or re-INVITE request.
When used in conjunction with the PJSIP_MEDIA_OFFER dialplan function,
the formats in use on a PJSIP channel can be re-negotiated and changed
dynamically after call setup.

ASTERISK-26277 #close

Change-Id: Ib98fe09ba889aafe26d58d32f0fd1323f8fd9b1b
2016-08-10 11:26:33 -05:00
zuul
d85e9d99cb Merge "res_rtp_asterisk: Cache local RTCP address." into 14 2016-08-10 10:37:40 -05:00
zuul
400ce294e6 Merge "Produce friendly error when AST_MODULE_SELF_SYM is not defined." into 14 2016-08-09 19:09:36 -05:00