Database Command - Add Tree?

In our dialplan we have a set command to add to the database a key/value like this:

/agent/id/516 : 9047

The command in the dialplan looks like this:

exten => logon,n,Set(DB(agent/id/${THE-HANDSET})=${THE-AGENT})

What I want to know is how on earth you can do this manually on the Asterisk CLI?

I tried:
database put agent id 516=9047
database put agent/id/516=9047
database put agent id/516=9047
database put “agent/id/516”=9047

None of which worked. I’ve looked up the documentation but its incredibly sparse and doesn’t say how to set values that are part of a tree.

I’d be very grateful for your help.

The format of the command is "database put ", so you can’t have a “four levels tree”, just a “three levels tree” and need to manage this in a different way, perhaps “agent_id/516=9047” (“database put agent_id 516 9047”).

Hope it helps.



Are you trying to set the value 9047 to the database key id516 for example

basicly you have FAMILY KEY VALUE

you seem to be trying to go one deeper.

without tesing

[quote]database put agent id516 9047[/quote] should work


Much appreciate your help so far but unfortunately there is another level and it is working.

It’s editing this level using the CLI that I can’t manage.

In this instance the “family” would appear to be “agent” and the key would be “id/516” with the value being set to 9047.

ANy thoughts?

I think is the slash that it is confusing the CLI.