queue_member_exists()

Hello!

Why we have a function QUEUE_EXISTS to check if queue exists, but can not check if a member exists?
That would be cool if there would be a function like:

QUEUE_MEMBER_EXISTS()

Synopsis
Check if a named interface is logged in to queue

Description
Returns 1 if the specified interface is logged in to specified queue,
0 if it is not

Syntax
QUEUE_MEMBER_EXISTS(queuename,interface)

Arguments
queuename
interface

=============

Currently I accomplish this using 9 dialplan strings, that’s a bit too much.

Do you think this feature would be useful? If yes maybe I will invest
in making a patch to add this feature.

Hello,

You can accomplish this by using the AddQueueMember() application. It will return
ADDED
MEMBERALREADY
NOSUCHQUEUE

depending on if the interface is in the queue, or not.

It’s kind of quick and dirty, but that does the job.

Rgds,
Constantin

Yep, but what if I don’t want to add this member if he’s not there?

I don’t think is a ‘native’ way to do this.

You can try the trick suggested earlier and in case of ADDED, call the RemoveQueueMember.

Or you can get the queue members by CLI ‘queue show member’.

Both tricks are kinda dirty, but i don’t think there is a proper way to do this.

Rgds

The right place to propose new features is the developer mailing list.