There a long history here:
In commit dd1e62c095 has introduce by default shared_lastcall = true by
default but this now only happen is there not [general] directive in
queues.conf
After that, the commit 4b50e3f1ee fix the
sample file.
We'll need to keep the same setting if there a general or not section in
configuration file since the shared_lastcall is by a long time in
sample files as default value to 'no'.
Change-Id: Id44faec370136df8d57902b453ad4059ed21b94c
* Always set member->lastpause when setting member->paused
* Fixed typo (using member->lastcall instead of member->lastpause) in
'queue show' output.
* Use a constant 'now' in 'queue show' output for a better point-in-time
view of time based stats.
ASTERISK-27541 #close
Reported by: César Benjamín García Martínez
Change-Id: Ib41ced90cfdb66f9bb1e7b263d0f6fc1ac6e18fa
It was a copy/paste of the QUEUE_MEMBER_COUNT function's synopsis.
ASTERISK-20986 #close
Reported by: Olivier Krief
Change-Id: If51ec481feb35824a4e78ab5600b197b819b10be
Fixes an intermittent segmentation fault which occured when accessing
nativeformats of a channel which entered into a queue.
ASTERISK-27964
Reported by: Francisco Seratti
Change-Id: Ic87fa7a363f3b487c24ce07032f4b2201c22db9e
While the 'interface' column is a NOT NULL, the empty string is still
allowed. res_config_odbc treats the empty string as a NULL and we crash
when trying to dereference.
Also cleaned up an adjacent error message for consistency.
ASTERISK-28168 #close
Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
This change add ability to set the wrapuptime per-member using the
AddQueueMember application.
The feature to set wrapuptime per member was include in the issue
ASTERISK-27483 for static member by configuration file and was not
added to set from AddQueueMember.
ASTERISK-28055 #close
Change-Id: I7c7ee4a6f804922cd7c42cb02eea26eb3806c6cf
When using the 'b' option to Queue with a queue that was not configured
for ring all a crash would occur as the wrong pointer would be used.
ASTERISK-28218
Change-Id: If1390f64e321047dff24fd2410c95dde74904980
When a channel snapshot was created it used to be done
from scratch, copying all data (many strings). This incurs
a cost when doing so.
This change segments the channel snapshot into different
components which can be reused if unchanged from the
previous snapshot creation, reducing the cost. In normal
cases this results in some pointers being copied with
reference count being bumped, some integers being set,
and a string or two copied. The other benefit is that it
is now possible to determine if a channel snapshot update
is redundant and thus stop it before a message is published
to stasis.
The specific segments in the channel snapshot were split up
based on whether they are changed together, how often they
are changed, and their general grouping. In practice only
1 (or 0) of the segments actually get changed in normal
operation.
Invalidation is done by setting a flag on the channel when
the segment source is changed, forcing creation of a new
segment when the channel snapshot is created.
ASTERISK-28119
Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
Replace usage of ao2_container_alloc with ao2_container_alloc_hash or
ao2_container_alloc_list. Remove ao2_container_alloc macro.
Change-Id: I0907d78bc66efc775672df37c8faad00f2f6c088
This replaces the inline functions with macros. This removes the need
to directly use __ao2_ref, opts instead for standard ao2_bump and
ao2_cleanup macros.
Change-Id: If4e04e9bab2e3c883188437cb9f487b3e498a21b
This change adds the ability for subscriptions to indicate
which message types they are interested in accepting. By
doing so the filtering is done before being dispatched
to the subscriber, reducing the amount of work that has
to be done.
This is optional and if a subscriber does not add
message types they wish to accept and set the subscription
to selective filtering the previous behavior is preserved
and they receive all messages.
There is also the ability to explicitly force the reception
of all messages for cases such as AMI or ARI where a large
number of messages are expected that are then generically
converted into a different format.
ASTERISK-28103
Change-Id: I99bee23895baa0a117985d51683f7963b77aa190
The 'I' option currently blocks initial CONNECTEDLINE or REDIRECTING updates
from the called parties to the caller.
This patch also blocks updates in the other direction before call is
answered.
ASTERISK-27980
Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
* Update the post-answer documentation and example. The Dial example was
incorrect and misleading for the post-answer subroutine useage.
* Fix note and warning paragraphs in option descriptions. They don't show
up in the wiki.
Change-Id: I81019a1fd75d5b9151f76b52c38e2a90da682d14
Declining the queue_member_status_type stasis message in stasis.conf
causes these messages to leak json objects.
* Add missing ast_json_unref() if the type is NULL in
queue_publish_member_blob().
ASTERISK-28084
Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc
This issue related to setting of holdtime, announcements, member delays.
It works well if we set the member delays to "0" and no announcements
and no holdtime.This issue will happen if we set member delays to "1",
"2"... or announcements or holdtime and hangs up the call during
processing it.
And here is the reason:
(At the step of answering a phone.)
It takes care any holdtime, announcements, member delays,
or other options after a call has been answered if it exists.
Normally, After the call has been aswered,
and we wait for the processing one of the cases of the member delays
or hold time or announcements finished, "if (ast_check_hangup(peer))"
will be not executed, then queue will be updated at update_queue().
Here, pending member will be removed.
However, after the call has been aswered,
if we hangs up the call during one of the cases of the member delays
or hold time or announcements, "if (ast_check_hangup(peer))"
will be executed.
outgoing = NULL and at hangupcalls, pending members will not be removed.
* This fixed patch will remove the pending member from container
before hanging up the call with outgoing is NULL.
ASTERISK-27920
Reported by: Cao Minh Hiep
Tested by: Cao Minh Hiep
Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855
I'm only seeing an error in 14+, so I assume it is due to different
compiler options:
app_queue.c: In function ‘handle_queue_add_member’:
app_queue.c:10234:19: error: ‘%d’ directive writing between 1 and 11
bytes into a region of size 3 [-Werror=format-overflow=]
sprintf(num, "%d", state);
^~
app_queue.c:10234:18: note: directive argument in the range
[-2147483648, 99]
sprintf(num, "%d", state);
^~~~
Compiler: gcc version 8.0.1 20180414 (experimental)
[trunk revision 259383] (Ubuntu 8-20180414-1ubuntu2)
Change-Id: I18577590da46829c1ea7d8b82e41d69f105baa10
When a call leaves a queue on leaveempty condition, QUEUESTATUS
must be set to LEAVEEMPTY, no matter whether Queue was executed with or
without the "c" (continue) option.
The regression was introduced in the fix for ASTERISK_25665.
The following fix (ASTERISK_27065) was incomplete, as QUEUESTATUS was
overwritten in case when "c" is set, regardless of what was the cause
for leaving the queue.
ASTERISK-27973 #close
Reported-by: Valentin Safonov
Change-Id: Iec013fe6a26a4e825ca572a1dda4f3cee5f6f80c
Add predial handler support to app_queue. app_dial (ASTERISK_19548) and
app_originate (ASTERISK_26587) have the ability to execute predial
handlers on caller and callee channels. This patch adds predial handlers
to app_queue and uses the same options as Dial and Originate (b and B).
The caller routine gets executed when the caller first enters the queue.
The callee routine gets executed for each queue member when they are about
to be called.
ASTERISK-27912
Change-Id: I5acf5c32587ee008658d12e8a8049eb8fa4d0f24
This fixes build warnings found by GCC 8. In some cases format
truncation is intentional so the warning is just suppressed.
ASTERISK-27824 #close
Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
* Declare 'requires' and 'enhances' text fields on module info structure.
* Rename 'nonoptreq' to 'optional_modules'.
* Update doxygen comments.
Still need to investigate dependencies among modules I cannot compile.
Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
This patch adds the ability to set the wrapuptime on the queue member
config.
When the option is set the wrapuptime on the queue member is used instead
of the queue's wrapuptime.
ASTERISK-27483 #close
Change-Id: I11c85809537f974eb44dc5bbf82bcedd8a458902
The approach with having a single global subscription to all extension
state changes has one issue: dynamically created hints don't have any
watchers and are therefore garbage collected on the first dialplan
reload.
This change creates a state subscription for every queue member with a
hint as state_interface, thus increasing the count of watches for
hints, so they are not destroyed prematurely anymore.
There are 2 side effects:
1. The state change callback in app_queue is not executed when
there are no members referring to the extension.
2. The callback is called multiple times for the same hint if it's
associated with more than one queue member.
Reported by: Steven T. Wheeler
ASTERISK-18411 #close
Change-Id: I4956af2136ea2a7f110ac9272eae5f6e676d8f89
* 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
The previous patch for ASTERISK-27216 made it so you wouldn't get any
position or periodic announcements unless you had announce-to-first-user
enabled. The announce-to-first-user feature was added by ASTERISK_21782
as a result of the patch which introduced the redundant announcements that
ASTERISK-27216 removes.
* By noting that the makeannouncement variable is used to suppresses the
first user announcement, we set its initial value to the
announce-to-first-user enable setting.
ASTERISK-27216
Change-Id: Ieaeb7dbea8ae7073086b775fbafe0625b000b10a
This patch reverts the change by patch 2263 from old reviewboard.
Note that reverting that 2263-patch still preserves the behaviour that
the commit log of the 2263-patch claimed to add. The reason for this is:
The function wait_for_answer is only called from try_calling which
in turn is only called from the main for loop in queue_exec, and
earlier in that loop we already check the things that's removed by
this patch. There's no need to check those things twice each loop
iteration, and I think the proper place to check it is before each
ringing cycle. By checking it in wait_for_answer, you allow the issue
explained in the jira - that the head caller hears announcements while
the agents' sip phones are actively ringing.
Reported-by: Stefan Engström
Tested-by: Stefan Engström
ASTERISK-27216 #close
Change-Id: Ic4290dc75256f9743900c6762ee1bb915f672db0
Fixed to use correct initial value and fixed to use the
correct queue info to check the first value.
ASTERISK-27204
Change-Id: Ia9e36c828e566e1cc25c66f73307566e4acb8e73
GCC 7 has added capability to produce warnings, this fixes most of those
warnings. The specific warnings are disabled in a few places:
* app_voicemail.c: truncation of paths more than 4096 chars in many places.
* chan_mgcp.c: callid truncated to 80 chars.
* cdr.c: two userfields are combined to cdr copy, fix would break ABI.
* tcptls.c: ignore use of deprecated method SSLv3_client_method().
ASTERISK-27156 #close
Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
Setting this option will cause the Queue application to only announce
the caller's position if it has improved since the last time that we
announced it.
Change-Id: I173a124121422209485b043e2bf784f54242fce6
When performing the "Queues" action via AMI, it outputs the same
text that the Asterisk CLI outputs when running a "queue show"
command, which does not conform with the AMI spec. "QueueStatus"
already does what the "Queues" action should do, so instead of
correcting the output, the "Queues" action will be removed and
"QueueStatus" should be used instead.
ASTERISK-27073 #close
Reported by: Brian
Change-Id: Id11743859758255b69cc3a557750d7a56c6d16f8
This API was not actively maintained, was not added to new modules
(such as res_pjsip), and there exist better alternatives to acquire the
same information, such as the ARI.
Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83
The fix for ASTERISK-25665 introduced a regression.
The return value of queue_exec used to be 0 in case of leavewhenempty
but it was changed to -1 (returned from wait_our_turn and passed
transparently by queue_exec), thus leading to hangup instead of returning
back to dialplan.
This commit resets the value back to 0 in this case, restoring
original behavior.
ASTERISK-27065 #close
Reported by: Marek Cervenka
Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
A change was done which added an 'in_call' flag to queue
members that was set to true while talking to an agent.
Unfortunately in practice this does not accurately reflect
whether they are talking to an agent or not. If a Local
channel is involved and a transfer is performed then the
app_queue application would incorrectly think the agent
was still in a call with the caller. This was done to
fix a race condition between an agent becoming available
by device state and the checking of the last call information
for the wrapup time. There was a small window where the
last call information would be the previous value instead
of the new one.
This change goes about fixing the original issue in a
different way by considering the call completed if device
state is received which would make the agent available
and if they are currently in a call. If this occurs the
last call information is updated before the agent becomes
available ensuring that old information is not present
when checking if the member should be called. This also
improves the transfer situation by actually updating
and enforcing the wrapup time.
ASTERISK-26399
ASTERISK-26400
ASTERISK-26715
ASTERISK-26975
Change-Id: Ife1cb686e3173b3a6d368601adef9aff69d4beea
Additional variable to work alongside QUEUE_MAX_PENALTY and QUEUE_MIN_PENALTY,
including an extra parameter in queuerules.conf. This value causes lower
Agent penalty values to "raise up" so that they can join higher penalty agents
and be treated equally after a period of time.
ASTERISK-26995 #close
Change-Id: If1c6421a983667a5ac4c359f6dac25b212b4c459
There are 2 places in app_queue.c that log EXITEMPTY event: one in
wait_our_turn, and another one in queue_exec in the loop trying to
call an agent after wait_our_turn.
In most cases it leads to logging EXITEMPTY twice.
ABANDON is also logged on two places, and in the rare case when an agent
and caller hang up simultaneously it's also possible to get duplicates
in queue_log.
This commit changes wait_our_turn to return -1 ("the caller should exit
the queue") instead of 0 ("the caller's turn has arrived") in case of
leaving when empty, so queue_exec skips the agent calling loop.
Also, leave_queue is now executed only once in this case, because 2nd
time is just a noop when the queue entry has already been removed.
Also, it sets qe->handled to -1 to indicate that the call was not
answered by an agent, but the necessary handling has already been done
in order to avoid logging an extra ABANDON entry.
ASTERISK-25665 #close
Reported by: Ove Aursand
Change-Id: I4578dd383bf2ac41589cf167865e8aaebcd4c11e
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting
if a module can't be loaded. If the user wishes to retain the
FAILURE behavior for a specific module, they can use the "require"
or "preload-require" keyword in modules.conf.
A new API was added to logger: ast_is_logger_initialized(). This
allows asterisk.c/check_init() to print to the error log once the
logger subsystem is ready instead of just to stdout. If something
does fail before the logger is initialized, we now print to stderr
instead of stdout.
Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
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