[asterisk-dev] suggestion for modifying PauseQueueMember
John Lange
john.lange at open-it.ca
Wed Mar 26 09:48:52 CDT 2008
There seems to be some inconsistencies with functions in the app_queue.c
code.
The functions AddQueueMember, and RemoveQueueMember require the queue as
a parameter and optionally accept an interface to add to the queue. If
no interface is supplied; it is determined automatically from the
calling device. This all makes sense.
AddQueueMember (queuename[|[interface]|[penalty][|options][|membername]]
On the other hand, PauseQueueMember does not require a queue but DOES
require the interface be passed as a parameter. Should it not be able to
automatically determine the interface just like AddQueue?
Here is the code from AddQueue:
if (ast_strlen_zero(args.interface)) {
args.interface = ast_strdupa(chan->name);
If this was added to Pause this would change Pause so that all
parameters are optional as in:
PauseQueueMember([queuename][|interface][|options])
Furthermore, how do you even use Pause as it is? How do you obtain the
interface for dynamic queues? Is there some secret channel variable that
contains the interface?
And one more thing; doc/queues-with-callback-members.txt gives this
example:
PauseQueueMember(${queuename},Local/${MACRO_EXTEN:1}@agents);
This can't work for dynamic queues and also, the separator is a comma.
If there isn't something I'm missing here I will do up a little patch
for pause and unpause.
John
More information about the asterisk-dev
mailing list