Queue: 'add member' and 'remove member'

Hi,

I’m here as a complete newbie to AGI with probably a stupid question but thanks for reading anyway.

I have a ‘test’ queue and a ‘test’ extension that I have been using to try out logging extensions in and out of queues using AGI run from PHP.

My ‘remove member’ command ran fine:

$result = $asm->Command(“queue remove member Local/$member@from-queue/n from $queue”);

So I tried the ‘add member’ method:

$result = $asm->Command(“queue add member Local/$member@from-queue/n to $queue”);

It looked OK at first when it returned:

Command Added interface ‘Local/290@from-queue/n’ to queue ‘521’

But unfortunately, that’s where I hit Snapcity. I found that calls were no longer being routed to the extension as expected, plus the extension’s normal log-in/log-out toggle was only replying with “Agent logged off”, not “Agent logged on” anymore.

It looks like I had something missing from my ‘add member’ command as running

$result = $asm->Command(“queue show $queue”);

returned:

Local/290@to-queue/n (ringinuse enabled) (dynamic) (Invalid)

for the test extension rather than something like this for the other extensions in the queue:

Phone 399(Local/399@from-queue/n from hint:399@ext-local) (ringinuse enabled) (Not in use)

or

Phone 295 (Local/295@from-queue/n from hint:295@ext-local) (ringinuse enabled) (dynamic) (Unavailable)

So it looks to me like my add request has created a kind of malformed entry but I can’t see from the documentation where I’ve gone wrong. Can anyone point me in the right direction?

Thanks muchly in advance!

Try to reproduce this using the CLI directly.

Why do you use Local extensions instead of plain PJSIP/399 ? anyway I think Local/399@from-queue/n should be Local/399.

Problem could be direct on the PHP class, so as @david551 requested try the command directly on the CLI

The above syntax using the n modifier is totally correct
Local/101@mycontext/n

It’s the typical way of simulating the, older, agent callback login functionality.

Local/399 is shorthand for Local/399@default, which is not the same as Local/399@from-queue/n

Looks like you are using freepbx dialplans.
As you showed, context quoted are wrong. That must be from-queue and not to-queue.

Second, if you are trying login a sip user from a trunked PBX, you must take a look at context macro-toggle-add-agent and remove hint once remote users will not active hint.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.