Commit Graph

323 Commits

Author SHA1 Message Date
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
Kevin P. Fleming fed9126600 Merged revisions 47432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47432 | kpfleming | 2006-11-10 10:34:04 -0600 (Fri, 10 Nov 2006) | 2 lines

reflect addition/removal of dynamic queue members in queue_log, so that people using dialplan replacement for AgentCallbackLogin can still track login/logout (issue #7736, reported/patched by whoiswes but this commit was written by me and covers all three paths for AQM/RQM)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 16:37:42 +00:00
Luigi Rizzo 6b459ebd0c %ld and time_t don't match, so cast the argument to long
to ease portability problems



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 22:26:48 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
BJ Weschke eea3a260da Let's make sure we hold the mutex lock before we go looking at values in the queue structure that could potentially be changing while we're running.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 19:28:34 +00:00
BJ Weschke 95a4fc7af2 * Added option to run macro when a queue member is connected to a caller,
see queues.conf.sample for details.
  * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and
    setqueueentryvar options for each queue, see queues.conf.sample for details.
								(#8216, jmls reported and submitted)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 18:59:16 +00:00
Russell Bryant 414f448b09 Merged revisions 46249 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46249 | russell | 2006-10-25 14:08:18 -0500 (Wed, 25 Oct 2006) | 2 lines

update warning message to include "agi" option (issue #8225, jmls)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 19:10:43 +00:00
Kevin P. Fleming 749029de38 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Kevin P. Fleming 3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Kevin P. Fleming e486316dc6 Merged revisions 44298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44298 | kpfleming | 2006-10-03 15:18:29 -0500 (Tue, 03 Oct 2006) | 10 lines

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

........
r44296 | kpfleming | 2006-10-03 15:14:13 -0500 (Tue, 03 Oct 2006) | 2 lines

fix a logic error in my previous fix to the queue reload code

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 20:19:32 +00:00
Joshua Colp 31800f61c3 Strat becomes Strategy based on feedback from two nameless fellows
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 20:17:40 +00:00
Joshua Colp e550109383 Add 'Strat' manager field to QueueParams event. (issue #7704 reported by renemendoza)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 17:41:41 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp 8ff3dd273a Expand setinterfacevar option to also set a variable, MEMBERNAME, which contains the member's name. (issue #8046 reported by jmls)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:58:48 +00:00
Joshua Colp 3e4a081e1c Make callerid fields in Manager events more consistent. CallerIDNum for number and CallerIDName for name. (issue #7976 reported by suhler)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:35:16 +00:00
Joshua Colp cc1945ce1b Add option 'keepstats' which will keep queue statistics during a reload. (issue #7908 reported by jmls)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 15:40:38 +00:00
Jason Parker e2a52816fc Merged revisions 43944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43944 | qwell | 2006-09-28 13:11:22 -0700 (Thu, 28 Sep 2006) | 4 lines

Fix incorrect argument order for member names, on persisted members.

Issue 8047, patch by jmls.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 20:13:09 +00:00
Kevin P. Fleming 5ae60ec272 Merged revisions 43919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43919 | kpfleming | 2006-09-28 12:35:42 -0500 (Thu, 28 Sep 2006) | 10 lines

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

........
r43916 | kpfleming | 2006-09-28 12:31:57 -0500 (Thu, 28 Sep 2006) | 2 lines

fix buggy (and overly complex) loop used during reload of app_queue for static member list updating

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 17:38:07 +00:00
BJ Weschke 9baf50ee9a Merged revisions 43899 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43899 | bweschke | 2006-09-28 12:41:05 -0400 (Thu, 28 Sep 2006) | 11 lines

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

........
r43897 | bweschke | 2006-09-28 12:37:15 -0400 (Thu, 28 Sep 2006) | 3 lines

 app_queue is comparing the device names incorrectly while checking their statuses. It's internal list of interfaces includes the dial string, while the argument passed to this function does not have the dial string (/n for a local channel). This causes it to ignore the device state changes because it thinks it belongs to none of its members. (#8040 reported and patch by tim_ringenbach)


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 16:54:01 +00:00
BJ Weschke 3b3702f9bc Merged revisions 43873 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43873 | bweschke | 2006-09-28 11:29:21 -0400 (Thu, 28 Sep 2006) | 11 lines

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

........
r43871 | bweschke | 2006-09-28 11:18:05 -0400 (Thu, 28 Sep 2006) | 3 lines

 Fix race condion crash with get_member_status (#7864 - tim_ringenbach reported and patched)


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 15:32:48 +00:00
BJ Weschke 4a50548ab2 Merged revisions 43864 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43864 | bweschke | 2006-09-28 09:24:10 -0400 (Thu, 28 Sep 2006) | 3 lines

 Autopause not working for queue members. (#8042 - jmls reported and patch)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 13:35:04 +00:00
Jason Parker a046b75f8a Add QueueSummary manager action.
Gives "at a glance" information about a single queue, or all queues.

Issue #8035, patch by rgollent, slightly modified (formatting) by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 21:30:41 +00:00
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:17:39 +00:00
Tilghman Lesher fc88db013e Remove deprecated apps and funcs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 19:35:29 +00:00
Tilghman Lesher 70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Jason Parker 61e4465f49 Fix a segfault that was reported by jcmoore in #asterisk-bugs on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 19:46:18 +00:00
Jason Parker 50c1981780 We need to persist the member name also
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 06:14:05 +00:00
Jason Parker a7119b522d Add a "member name" to queue members.
Add option to the various methods of adding a queue member, to add the "member name".

Member name is used in (most) queue log records, in place of the interface name.
This makes it consistent, so that you can log in from any device, and still be logged as "member name"


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 05:59:53 +00:00
Matt O'Gorman d0a1a0033d similar patch for verbose vs debug with minor changes
bug 2617


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:45 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
BJ Weschke c5c1d4579f This was added to app_dial a while back, and now it's in app_queue as well. Provide an option to prevent members of the queue from forwarding calls from the queue to somewhere else.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 19:32:51 +00:00
BJ Weschke 06b98dcc77 Merged revisions 41882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41882 | bweschke | 2006-09-03 13:38:22 -0400 (Sun, 03 Sep 2006) | 3 lines

 Make sure the forwarded channel inherits variables appropriately when we receive a call forward in the queue. (#7867 - raarts reported and patched)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:40:08 +00:00
BJ Weschke 91f4aa93bb Don't keep trying the same member in certain strategies when members of the queue are unavailable (#7278 - diLLec reported and patched)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:12:30 +00:00
BJ Weschke b6ccca7566 Merged revisions 41827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41827 | bweschke | 2006-09-03 10:16:08 -0400 (Sun, 03 Sep 2006) | 3 lines

 Setting a retry of 0 is generally not a good idea and shouldn't be allowed. (#7574 - reported by regin)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:28:25 +00:00
BJ Weschke e736c8a27b With the somewhat recent addition (from one of the Astridevcon Europe sessions) of more detailed device states, we need to change strategy in app_queue in how we determine whether a queue member is "in use" or not. Basically, instead of specifically looking for that device state as we did previously, now we're going to observe any other device state aside from the two that we know for sure are "not in use" as "in use". This will cause some other states to fall through that we know will never be available (eg - "INVALID","UNAVAILABLE",etc) but there's other code already within to handle those conditions. (#7433 - tgrman reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-02 18:36:53 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00