Adding/Removing Queue Agents via SQL

I’d like to make a quick and dirty method for agents to log in and out of a queue and also view their status via their computer.

I am looking at the queues_details table and thinking this should be quite easy to do from the database standpoint. However, I need to understand the data before I am going to insert my own.

Here is an example of what the table looks like:

±-----±----------------------------±--------------------------±------+
| id | keyword | data | flags |
±-----±----------------------------±--------------------------±------+
| 1000 | member | Local/4800@from-queue/n,0 | 0 |

In this example, I need to know what the 0 is at the end of the data field “Local/4800@from-queue/n,0” is for – is that the penalty value? Would I just be adding subsequent extensions exactly the same, like “Local/4821@from-queue/n,0” and so on.

Also, does Asterisk need to be reloaded after adding a dynamic member to the queue?

Hope this made sense.

Thanks!