This newly introduced periodic-announce-startdelay makes it possible to
configure the initial start delay of the first periodic announcement
after which periodic-announce-frequency takes over.
UserNote: Introduce a new queue configuration option called
'periodic-announce-startdelay' which will vary the normal (historic)
behavior of starting the periodic announcement cycle at
periodic-announce-frequency seconds after entering the queue to start
the periodic announcement cycle at period-announce-startdelay seconds
after joining the queue. The default behavior if this config option is
not set remains unchanged.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
The app_queue module provides both an AMI action and a CLI command
to change the priority of a caller in a queue. Up to now this change
of priority has only been reflected to new callers into the queue.
This change adds an "immediate" option to both the AMI action and
CLI command which immediately applies the priority change respective
to the other callers already in the queue. This can allow, for example,
a caller to be placed at the head of the queue immediately if their
priority is sufficient.
Resolves: #202
UserNote: The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.
This adds an option 'force_longest_waiting_caller' which changes the
global behavior of the queue engine to prevent queue callers from
'jumping ahead' when an agent is in multiple queues.
Resolves: #108
Also closes old asterisk issues:
- ASTERISK-17732
- ASTERISK-17570
Change-Id: I0f84e27903fefbe2018d0afa2d67b23aa0b321ce
When Asterisk is restarted it does not preserve paused reason for
members of realtime queues. This was fixed for non-realtime queues in
ASTERISK_25732
Resolves: #66
UpgradeNote: Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.
UserNote: Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.
The F option in the xmldocs for the Queue application
was erroneously duplicated, causing it to display
twice on the wiki. The two sections are now merged into one.
Additionally, the description for the d option was quite
vague. Some more details are added to provide context
as to what this actually does.
ASTERISK-30486 #close
Change-Id: I6706cea708b5cc781f59f8652c2cb377e55aed7e
This newly introduced periodic-announce-startdelay makes it possible to
configure the initial start delay of the first periodic announcement
after which periodic-announce-frequency takes over.
ASTERISK-30437 #close
Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Several queue fields were not being set to their default value during
a reload.
Additionally added some sample configuration options that were missing
from queues.conf.sample.
Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
For most modules that interacted with app_macro, this change is limited
to no longer looking for the current context from the macrocontext when
set. Additionally, the following modules are impacted:
app_dial - no longer supports M^ connected/redirecting macro
app_minivm - samples written using macro will no longer work.
The sample needs a re-write
app_queue - can no longer a macro on the called party's channel.
Use gosub which is currently supported
ccss - no callback macro, gosub only
app_voicemail - no macro support
channel - remove macrocontext and priority, no connected line or
redirection macro options
options - stdexten is deprecated to gosub as the default and only
pbx - removed macrolock
pbx_dundi - no longer look for macro
snmp - removed macro context, exten, and priority
ASTERISK-30304
Change-Id: I830daab293117179b8d61bd4df0d971a1b3d07f6
Adds the m option to the Queue application, which allows a
music on hold class to be specified at runtime which will
override the class configured in queues.conf.
This option functions like the m option to Dial.
ASTERISK-29876 #close
Change-Id: Ie25a48569cf8755c305c9438b1ed292c3adcf8d7
This adds a new AMI action called QueueWithdrawCaller.
This AMI action makes it possible to withdraw a caller from a queue,
in a safe and a generic manner.
This can be useful for retrieving a specific call and
dispatching it to a specific extension.
It works by signaling the caller to exit the queue application
whenever it can. Therefore, it is not guaranteed
that the call will leave the queue.
ASTERISK-29909 #close
Change-Id: Ic15aa238e23b2884abdcaadff2fda7679e29b7ec
There are a lot of Queue AMI actions and Queue applications
which do not load queue and queue members from Realtime.
AMI actions
QueuePause - if queue not in memory - response "Interface not found".
QueueStatus/QueueSummary - if queue not in memory - empty response.
Applications:
PauseQueueMember - if queue not in memory
Attempt to pause interface %s, not found
UnpauseQueueMember - if queue not in memory
Attempt to unpause interface xxxxx, not found
This patch adds a new function load_realtime_queues
which loads queue and queue members for desired queue
or all queues and all members if param 'queuename' is NULL or empty.
Calls the function load_realtime_queues when needed.
Also this patch fixes leak of ast_config in function set_member_value.
Also this patch fixes incorrect LOG_WARNING when pausing/unpausing
already paused/unpaused member.
The function ast_update_realtime returns 0 when no record modified.
So 0 is not an error to warn about.
ASTERISK-29873 #close
ASTERISK-18416 #close
ASTERISK-27597 #close
Change-Id: I554ee0eebde93bd8f49df7f84b74acb21edcb99c
if holdtime is (0 min, 0 sec) there is no hold time announcements
we should then also not playing queue-thankyou
ASTERISK-29831
Change-Id: Ic7e51dcde526b23f1cd8d24e1d1e2d81e10f9d2c
adding support for playing the correct en/et for nordic languages
by adding 'n' for neuter gender in the relevant ast_say_number
ASTERISK-29827
Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
Adds missing documentation for some channel,
bridge, and queue events.
ASTERISK-24427
ASTERISK-29515
Change-Id: I92b06b88c8cadc0155f95ebe3e870b3e795a8c64
A previous patch for ASTERISK_29578 caused a 'leak' of
extension state information across queues, causing the
state of the first member of unrelated queues to be
updated in addition to the correct member. Which queues
and members depended on the order of queues in the
iterator.
Additionally, it is possible to use the same 'hint:' on
multiple queue members, so the update cannot break out
of the update loop early when a match is found.
ASTERISK-29806 #close
Change-Id: If2c1d1cc2a752afd9286d79710fc818596e7a7ad
added that we set DIALEDPEERNUMBER on the outgoing channels
so it is avalible in b(content^extension^line)
this add the same behaviour as Dial
ASTERISK-29795
Change-Id: Icbc589ea2066f0c401a892bf478f6b2fd44e62f6
Most examples in the XML documentation use the
example tag to demonstrate examples, which gets
parsed specially in the Wiki to make it easier
to follow for users.
This fixes a few modules to use the example
tag instead of vanilla para tags to bring them
in line with the standard syntax.
ASTERISK-29777 #close
Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
Add a time_t logintime to storage a time when a member is added into a
queue.
Also, includes show this time (in seconds) using a 'queue show' command
and the field LoginTime for response for AMI events.
ASTERISK-18069 #close
Change-Id: Ied6c3a300f78d78eebedeb3e16a1520fc3fff190
Previously, if custom hints were used with the hint:
format in app_queue, when device state changes occured,
app_queue would only do a literal string comparison of
the context used for the hint in app_queue and the context
of the hint which just changed state. This caused hints
to not update and become stale if the context associated
with the agent included the context which actually changes
state, essentially completely breaking device state for
any such agents defined in this manner.
This fix adds an additional check to ensure that included
contexts are also compared against the context which changed
state, so that the behavior is correct no matter whether the
context is specified to app_queue directly or indirectly.
ASTERISK-29578 #close
Change-Id: I8caf2f8da8157ef3d9ea71a8568c1eec95592b78
Prevents reloads of app_queue from also resetting
queue statistics.
Also preserves individual queue agent statistics
if we're just reloading members.
ASTERISK-28701
Change-Id: Ib5d4cdec175e44de38ef0f6ede4a7701751766f1
Allows multiple files comprising an agent announcement
to be played by separating on the ampersand, similar
to the multi-file support in other Asterisk applications.
ASTERISK-29528
Change-Id: Iec600d8cd5ba14aa1e4e37f906accb356cd7891a
Also removed the sample documentation, and some oddly-placed
documentation about the timeout argument to the Queue() application
itself. There is a large section on the timeout behavior below.
ASTERISK-26614 #close
Change-Id: I8f84e8304b50305b7c4cba2d9787a5d77c3a6217
If a queue member was updated with the same status multiple
times each time a QueueMemberStatus event would be sent
which would be a duplicate of the previous.
This change makes it so that the QueueMemberStatus event is
only sent if the status actually changes.
ASTERISK-29355
Change-Id: I580c60d992a0a8f2bea8b91c868771b3b490d116
Queue members using dialplan hints as a state interface must handle
INUSE+RINGING hint as RINGINUSE devstate, and INUSE + ONHOLD as INUSE.
ASTERISK-28369
Change-Id: I127e06943d4b4f1afc518f9e396de77449992b9f
Operations that update queues when shared_lastcall is set lock the
queue in question, then have to lock the queues container to find the
other queues with the same member. On the other hand, __queues_show
(which is called by both the CLI and AMI) does the reverse. It locks
the queues container, then iterates over the queues locking each in
turn to display them. This creates a deadlock.
* Moved queue print logic from __queues_show to a separate function
that can be called for a single queue.
* Updated __queues_show so it doesn't need to lock or traverse
the queues container to show a single queue.
* Updated __queues_show to snap a copy of the queues container and iterate
over that instead of locking the queues container and iterating over
it while locked. This prevents us from having to hold both the
container lock and the queue locks at the same time. This also
allows us to sort the queue entries.
ASTERISK-29155
Change-Id: I78d4dc36728c2d7bc187b97d82673fc77f2bcf41
This fixes a bug introduced mistakenly in ASTERISK-25665:
If leave-empty is enabled, a call may sometimes be removed from
a queue without recording it as abandoned.
This causes Asterisk to not generate an abandon event for that
call, and for the queue abandoned counter to be incorrect.
ASTERISK-29043 #close
Change-Id: I1a71b81df78adff59af587f1d8483cf57df430c7
This fixes the reseting members lastpause problem when realtime members is being used,
the function rt_handle_member_record was forcing the reset members lastpause because it
does not exist in realtime
ASTERISK-29034 #close
Change-Id: Ic9107e4456732a1f78412a32adb2ef87f5da40b5
If your queues.conf had _no_ [general] section, they would default to
'yes'. Now, they always default to 'no'.
(Actually, commit ed615afb7e already
partially fixed it for shared_lastcall.)
ASTERISK-28951
Change-Id: Ic39d8a0202906bc454194368bbfbae62990fe5f6
Because ring_entry() is not called, outgoing->chan is not touched here
either.
ASTERISK-28950
ASTERISK-28644
Change-Id: I564613715dfaf45af868251eb75a451f512af90f
Before this changeset, it was possible that a queue member (agent) was
called even though they just got out of a call, and wrapuptime seconds
hadn't passed yet.
This could happen if a member ended a call _between_ a new call attempt
and asterisk trying that particular member for a new call.
In that case, Asterisk would check the hangup time of the
call-before-the-last-call instead of the hangup time of the-last-call.
ASTERISK-28952
Change-Id: Ie0cab8f0e8d639c01cba633d4968ba19873d80b3
Add a new "masquarade" channel event, and use it in app_queue to track unique id's.
Testcase is submitted as https://gerrit.asterisk.org/c/testsuite/+/14210
ASTERISK-28829 #close
ASTERISK-25844 #close
Change-Id: Ifc5f9f9fd70903f3c6e49738d3bc632b085d2df6
The QueueMemberPause AMI event includes two fields that return the
reason a member was paused.
* In release branches, deprecate Reason in favor of PausedReason.
* In master, remove the Reason field entirely.
ASTERISK-28349 #close
Reported by: Niksa Baldun
Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296
There were still a few places in the code that could overflow when "packing"
a json object with a value outside the base type integer's range. For instance:
unsigned int value = INT_MAX + 1
ast_json_pack("{s: i}", value);
would result in a negative number being "packed". In those situations this patch
alters those values to a ast_json_int_t, which widens the value up to a long or
long long.
ASTERISK-28480
Change-Id: Ied530780d83e6f1772adba0e28d8938ef30c49a1
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