Realtime Queue Members not working

I have real time queues working okay, but it seems to be completely impossible to determine what combination of data I can put into the queue members table and get it to work.

All I ever get is this: ‘John Smith () (realtime) (Invalid) has taken no calls yet’

I created the table according to the plethora of examples given on the Internet and attempted to populate it with the following:

Membername - John Smith
queue_name - test_queue
interface - SIP/ABCD-2000
penalty -
paused - 0

That does not work at all. I have tried every combination I can think of, except obviously the one that is supposed to work. The examples given absolutely don’t work.

Running this on the CLI will properly add the interface: ‘queue add member SIP/ABCD-2000 to test_queue’

I just don’t get it. Do I even have all the right fields in my database table? What should I be populating a record with?

P.S - Adding the member to the queue manually on the CLI does work and the phone is able to take calls from the queue.





This is what I have and it is working good!

[code]table: queue_members

uniqueid: 1
membername: Agent/2010
queue_name: Reception-Q
interface: SIP/2010
paused: 1

uniqueid: 2
membername: Agent/2011
queue_name: Reception-Q
interface: SIP/2011
paused: 0

table: queues

name: Reception-Q
musiconhold: squeezecenter_ofelia
timeout: 45
monitor_type: 0
announce_frequency: 45
announce_holdtime: no
retry: 4
wrapuptime: 10
maxlen: 6
servicelevel: 50
strategy: ringall
joinempty: yes
leavewhenempty: yes
eventwhencalled: yes
reportholdtime: 0
ringinuse: 0
And I send the caller to the queue with this in my <extensions.conf> file.

Then I just pause and unpause the agent using a PHP script changing the paused value in queue_members.


I hope this can help you a little!

In the past I got the “Invalid” status for a realtime queue member when the sip device of the queue member was not registered at the time the member was added to the queue, in this case a subsequent “sip reload” changed the member queue status from “Invalid” to “Not in use”; could be worth try to check the status of the sip device (the member interface) when you’re populating the queue members table to add members to the queue.

Hope it helps you.


Marco Bruni

I appreciate the responses but it has not helped me so far.

I tried putting in those values (modifying it for my extensions) but it did not work. Same problems, although this time when I tried changing a value I noticed that queue show would not show any changes I made to the member value. It seems that Asterisk will only load from a uniqueid one time only. Only way around it was to do a restart.

As for checking to see if the phones are registered beforehand, this is for all phones on the system. Some of the phones I am trying to add are actually inuse.

In any case, my database stores registration states of the phones and uses database triggers to add/delete members from the table. Anytime a phone is registered it is attempting to add it automatically to the members table.

For what it is worth, I am not using MySQL, but ODBC/Firebird instead. I have tried walking through the source code to identify what fields it is selecting off and how it using it, but have had no success. It is quite frustrating that adding dynamic members through the AGI does not create the database records I need to inspect them for correct syntax and values.

All over the Internet I see people putting in Agent/Extension in for the member name and SIP/Extension in for the interface, but that just plain does not work on my installation.

Any other ideas? Please?

Something else that was interesting that occurred to me to try. I set the flag on the queue to set the member variables when a caller is connected to an agent. Wrote a simple macro to output that to the CLI.


Of course these were for queue members that I added manually on the CLI to accept calls. I am wrong in thinking that MEMBERNAME is membername column and MEMBERINTERFACE is the interface column in the database?

I put those exact values in the database and it failed again.

This is just a nightmare. Is there anyone on these forums that has experience with the source code that can track this down?

I just need to know what column names it is expecting to find, how it uses the data it selects from those fields to add the member dynamically. If I knew that I could put the right columns in the database and the correctly formatted values.

P.S - I am pretty darn certain the Realtime itself is working connecting to my database since queues, sip peers/users, and voicemail are all correctly working. The queue show x command even shows the values from the database, just claims it is invalid.

I added a column name called state_interface and populated it with the same values.

The first queue show x will still have the same invalid error while a subsequent call lists it as ‘not in use’!!!

Progress, i thought…

The queue will attempt to connect a caller to this phone, but then generates this on the CLI:

[Mar 19 20:23:31] WARNING[3013]: channel.c:3975 ast_request: No channel type registered for ‘’

I have done my own searching around and everybody else that is getting that error seems to have something malformed inbetween the single quotes. Mine is empty.

A realtime load queue_members queue_name x will load all the agents just fine and show all of the columns and data, even ones that are dummy test columns. So Asterisk is able to go the database and get data.

I am 99% convinced at this point that Asterisk is not using the data correctly. Since the single quotes are empty it is as if Asterisk was supposed to put that information into a variable somewhere and use it but it did not work out that way.