Commit Graph

358 Commits

Author SHA1 Message Date
Joshua Colp 96a646734f It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 13:35:20 +00:00
Jason Parker 6f8294847f Merged revisions 74428 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10158)
................
r74428 | qwell | 2007-07-10 14:58:53 -0500 (Tue, 10 Jul 2007) | 14 lines

Merged revisions 74427 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74427 | qwell | 2007-07-10 14:57:20 -0500 (Tue, 10 Jul 2007) | 6 lines

Fix an issue where it was possible to have a service level of over 100%
Between the time recalc_holdtime and update_queue was called, it was possible that the call could have been hungup.
Move both additions to the same place, so this won't happen.

Issue 10158, initial patch by makoto, modified by me.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 20:02:05 +00:00
Jason Parker 76e2e39f77 Fix building that was broken by recent monitor.h changes. Thanks Russell for pointing this out (and pointing out what I probably did to prevent gcc from fixing it - don't ctrl-C builds)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:07:25 +00:00
Mark Michelson ab398473a0 Merged revisions 74120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74120 | mmichelson | 2007-07-09 13:32:50 -0500 (Mon, 09 Jul 2007) | 6 lines

The n option for Queue should make the queue exit immediately after failure to reach any members and should not
be dependent on the timeout value passed to Queue

(closes issue #10127, reported by bcnit, repaired by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 18:37:09 +00:00
Russell Bryant 262dfb44cd Add Queue and DestinationChannel headers to the AgentCalled manager event
to be more like the rest of the events in this module.
(closes issue #10114, patch by kwakwaversal)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 16:35:43 +00:00
Jason Parker 25b941b238 Add the ability to play an announcement to queue caller just before bridging
Issue 7479, patch by tristan_mahe.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 22:23:23 +00:00
Mark Michelson 850287e46d Merged revisions 73400 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73400 | mmichelson | 2007-07-05 10:59:41 -0500 (Thu, 05 Jul 2007) | 5 lines

Correcting a minor CLI bug I found. When issuing the queue show command, if you type
queue show and then press tab, you can continue pressing tab and it will keep auto-completing
queue names even though only 1 queue can be used as an argument.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 16:05:22 +00:00
Joshua Colp 758873a068 Merged revisions 73316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r73316 | file | 2007-07-05 10:22:13 -0300 (Thu, 05 Jul 2007) | 10 lines

Merged revisions 73315 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r73315 | file | 2007-07-05 10:19:17 -0300 (Thu, 05 Jul 2007) | 2 lines

Reset ServicelevelPerf variable back to 0 if we are unable to calculate it each time... otherwise we will get previous values. (issue #10117 reported by noriyuki)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 13:23:49 +00:00
Russell Bryant 8a53d595a5 Fix up the device state processing thread in app_queue so that it's not
possible for there to be entries in the queue and the thread is just sleeping
(Thanks to mmichelson for bringing the problem to my attention)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 18:25:30 +00:00
Joshua Colp 7b60d29f68 Merged revisions 72328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72328 | file | 2007-06-27 18:45:49 -0400 (Wed, 27 Jun 2007) | 10 lines

Merged revisions 72327 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r72327 | file | 2007-06-27 18:43:11 -0400 (Wed, 27 Jun 2007) | 2 lines

Fix issue where queue log events might be missing. (issue #7765 reported by mtryfoss)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 22:48:15 +00:00
Tilghman Lesher 396a37eba8 Fix trunk brokenness; also, optimize application registration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 23:31:08 +00:00
Steve Murphy 2462d5ab4f Cleaning up a small disaster I created earlier
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 23:26:07 +00:00
Steve Murphy 57526b35cc As per 9228, now app_queue should have the proper machinery to do gosubs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 21:38:49 +00:00
Steve Murphy 866bbaa515 Via bug9228, no way to create macros via AEL, and some of the apps allow you to call macros..., I modded the apps that allow macro calls to allow gosubs calls also, to make them AEL compliant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 23:36:34 +00:00
Brett Bryant 7573042f95 Fixed issue where 'stop gracfeully' was hanging ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 22:23:51 +00:00
Russell Bryant 055d82cbce Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Russell Bryant 9e0458e9f1 Completely remove all of the code related to jumping to priority n + 101. yay!
(issue #9926, caio1982)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 15:58:28 +00:00
Russell Bryant e911f41166 Merged revisions 68280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r68280 | russell | 2007-06-07 16:16:07 -0500 (Thu, 07 Jun 2007) | 4 lines

Fix loading persistent queue members when using realtime configuration for queues.
Also, remove an unneeded leading slash for the astdb family.
(issue #9911, patch by atis)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 21:17:52 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Russell Bryant 605368649e Merge major changes to the way device state is passed around Asterisk. The two
places that cared about device states were app_queue and the hint code in pbx.c.
The changes include converting it to use the Asterisk event system, as well as
other efficiency improvements.
 * app_queue: This module used to register a callback into devicestate.c to
   monitor device state changes.  Now, it is just a subscriber to Asterisk
   events with the type, device state.
 * pbx.c hints: Previously, the device state processing thread in devicestate.c
   would call ast_hint_state_changed() each time the state of a device changed.
   Then, that code would go looking for all the hints that monitor that device,
   and call their callbacks.  All of this blocked the device state processing
   thread.  Now, the hint code is a subscriber of Asterisk events with the
   type, device state.  Furthermore, when this code receives a device state
   change event, it queues it up to be processed by another thread so that it
   doesn't block one of the event processing threads.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01 23:34:43 +00:00
Russell Bryant 9b5d9279be Fix a couple of spots in the handling of device states that could lead to a
double free.  (issue #9772, reported by Mike Anikienko, fix by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 12:52:03 +00:00
Russell Bryant ff73bfb7e7 I know we have talked about rewriting app_queue for Asterisk 1.6, but once I
saw this, I couldn't help myself from changing it.  Previously, for *every*
device state change, app_queue would spawn a thread to handle it.  Now, the
device state callback just puts the state change in a queue and it gets
handled by a single state change processing thread.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-21 06:56:21 +00:00
Russell Bryant 3ecad89b42 Merged revisions 64868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r64868 | russell | 2007-05-17 21:48:51 -0500 (Thu, 17 May 2007) | 5 lines

Fix a small bug I noticed while working on something else.  app_queue did not
unregister its device state monitoring callback in unload_module().  So, this
would make Asterisk crash on the first device state change after you 
unload the module.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 02:51:07 +00:00
Jason Parker 2d1b06faef Don't allow rounding seconds to weird values that may cause "unexpected" results.
Issue 9514.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 18:08:54 +00:00
Jason Parker 83c00e346e Add 'c' option to app_queue which allows for continuing in the dialplan if the callee hangs up.
Issue 9284, patch by lyl, modified a little bit by me (I felt 'continue' was better than 'keepalive')


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 17:38:36 +00:00
Russell Bryant 683417407e This patch adds additional information to the EXITWITHKEY and EXITWITHTIMEOUT
entries in the queue log.
(issue #7561, reported and originally patched by fkasumovic, patch slightly
 modified and updated to trunk by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 16:46:49 +00:00
Russell Bryant 672fbc1f81 Add a min-announce-frequency option to queues.conf which allows you to control the
minimum amount of time between queue announcements for use when the caller's queue
position changes frequently.
(issue #9604, patch by Matthew Roth)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 22:08:54 +00:00
Jason Parker 52ae7d58f7 Merged revisions 61694 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r61694 | qwell | 2007-04-20 14:51:49 -0500 (Fri, 20 Apr 2007) | 13 lines

Merged revisions 61692 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61692 | qwell | 2007-04-20 14:49:54 -0500 (Fri, 20 Apr 2007) | 5 lines

If the '* to hangup' option is not enabled, we don't need to disable * as a valid exit key.
  If it was enabled, this statement would've never been checked in the first place.

Issue #9552

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 19:54:54 +00:00
Jason Parker 0cb6714ce8 Merged revisions 61022 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61022 | qwell | 2007-04-09 14:05:48 -0500 (Mon, 09 Apr 2007) | 4 lines

Use the appropriate interface name with COMPLETECALLER.

Issue 9395.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 19:06:36 +00:00
Joshua Colp 9ab4327d8b Merged revisions 60762 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r60762 | file | 2007-04-08 13:04:44 -0400 (Sun, 08 Apr 2007) | 2 lines

Allow app_queue to use MONITOR_EXEC even if MONITOR_OPTIONS is not set. (issue #9495 reported by cduffy)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08 17:13:39 +00:00
Russell Bryant f0aeab730f Send a manager AgentComplete event when the agent transfers the call, in
addition to where it is already sent if either side hangs up.
(issue #9219, rgollent)
In passing, I put this code in a function so it would not be duplicated
a third time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 23:20:57 +00:00
Joshua Colp f95a15ed58 Merged revisions 55219 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55219 | file | 2007-02-17 12:39:32 -0500 (Sat, 17 Feb 2007) | 2 lines

Add missing membername option to AddQueueMember documentation. (issue #9088 reported by seanbright)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 17:41:47 +00:00
Joshua Colp 177953c8f1 We want to skip the queue if the name doesn't match the specified one, not if they *do*.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 16:48:20 +00:00
Joshua Colp d4c75e57c0 Increase "queue show" buffer size from 80 to 240. This should be more then enough for most cases. (issue #9089 reported by mvanbaak)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 16:39:24 +00:00
Joshua Colp 213983dee2 Merged revisions 55129 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55129 | file | 2007-02-16 21:59:50 -0500 (Fri, 16 Feb 2007) | 2 lines

Make the 'i' option of Queue actually work. (issue #8986 reported by utis)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 03:01:38 +00:00
Russell Bryant f60efe347a This introduces a new dialplan function, DEVSTATE, which allows you to do some
pretty cool things.

First, you can get the device state of anything in the dialplan:
  NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})
  NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)})

Most importantly, this allows you to create custom device states so you can
control phone lamps directly from the dialplan.
  Set(DEVSTATE(Custom:mycustomlamp)=BUSY)
  ...
  exten => mycustomlamp,hint,Custom:mycustomlamp


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13 22:02:20 +00:00
Joshua Colp 655da6da05 Clean up documentation of Queue application. (issue #9022 reported by seanbright)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09 17:14:10 +00:00
Olle Johansson d07e640c6f Merged revisions 53081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r53081 | oej | 2007-02-01 21:38:58 +0100 (Thu, 01 Feb 2007) | 2 lines

Change debug level for state change message that is not really informative when debugging app_queue

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:44:49 +00:00
Russell Bryant b233892198 Merged revisions 53046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines

Merged revisions 53045 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines

Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 21:35:15 +00:00
Russell Bryant 26a33b2ffc Merged revisions 53037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r53037 | russell | 2007-01-31 11:39:28 -0600 (Wed, 31 Jan 2007) | 3 lines

Only changed the paused status in an existing queue member if the paused
column exists.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 17:39:55 +00:00
Russell Bryant 59b382021e Merged revisions 53035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r53035 | russell | 2007-01-31 11:34:22 -0600 (Wed, 31 Jan 2007) | 4 lines

Instead of always creating a realtime queue member as unpaused, read the
"paused" column and use that value for the paused status of the member.
(issue #8949, jmls)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 17:35:14 +00:00
Joshua Colp 44beb7c475 Merged revisions 52416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r52416 | file | 2007-01-26 21:13:41 -0500 (Fri, 26 Jan 2007) | 10 lines

Merged revisions 52415 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r52415 | file | 2007-01-26 21:09:10 -0500 (Fri, 26 Jan 2007) | 2 lines

Make COMPLETECALLER and COMPLETEAGENT output to queue_log follow documentation. (issue #7677 reported by amilcar)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 02:15:21 +00:00
Kevin P. Fleming cd73a483f1 const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way here
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 23:32:42 +00:00
Kevin P. Fleming 87b9abc892 Merged revisions 49676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines

reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 22:43:18 +00:00
Luigi Rizzo ccebf3511c convert the final clients of ast_build_string to use ast_str_*()
Now the only module left using it is chan_sip.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 15:38:50 +00:00
Luigi Rizzo 18e5017634 replace ast_build_string() with ast_str_*();
simplify __queues_show()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17 22:47:30 +00:00
Russell Bryant 5824af9cbc Resolve some pointer signedness compiler warnings in app_osplookup, and
constify a bunch of usage strings for CLI commands.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:39:39 +00:00
Jason Parker a1a37dddfe Add ability to add custom queue log via manager interface.
Issue 7806, patch by alexrch, with slight modifications by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 20:46:36 +00:00
Joshua Colp 64d5316a53 Add 'loose' option to joinempty and leavewhenempty which is almost exactly like 'strict' except it does not count paused queue members as unavailable. (issue #8263 reported by gnarf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 18:23:55 +00:00
Kevin P. Fleming 9398ac87a2 Merged revisions 47433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47433 | kpfleming | 2006-11-10 10:36:49 -0600 (Fri, 10 Nov 2006) | 2 lines

if adding a queue member is LOG_NOTICE, then removing them should be LOG_NOTICE, not LOG_DEBUG

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 16:38:33 +00:00