Discussion:
[asterisk-users] AMI - DBPut
Tomislav Parcina
2007-03-12 12:15:34 UTC
Permalink
I'm using AMI on Asterisk 1.2.15 and I'm having problems with DBPut action.

If I execute this:
Action: DBPut
Family: checkin
Key: 316
Val: yes

Response: Error
Message: Missing action in request

I don't put anything in Asterisk DB.

If I execute this:
Action: DBPut
Family: <checkin>
Key: <316>
Val: <yes>

Response: Success
Message: Updated database successfully

Then I put data in Asterisk DB, but that data has < and >. How to enter
data in Asterisk DB without this brackets.

fc4*CLI> database show
/<checkin>/<316> : <yes>
/dozvola/148 : yes
--
Tomislav Parcina
***@email.t-com.hr
Lee Jenkins
2007-03-12 22:57:01 UTC
Permalink
Post by Tomislav Parcina
I'm using AMI on Asterisk 1.2.15 and I'm having problems with DBPut action.
Action: DBPut
Family: checkin
Key: 316
Val: yes
Try putting quotes around the value. I played with it a while back only
a little, but I can't remember if quotes did it or I ended up having
stripping the quotes off myself when I retrieved the value ...
--
Warm Regards,

Lee
Tomislav Parcina
2007-03-13 07:19:11 UTC
Permalink
Post by Lee Jenkins
Try putting quotes around the value. I played with it a while back only
a little, but I can't remember if quotes did it or I ended up having
stripping the quotes off myself when I retrieved the value ...
My first mail was copy/paste, so I'm positive I didn't make any error
typing. Now I have tried again with the similar input and it works.

Action: DBPut
Family: checkin
Key: 319
Val: yes

Response: Success
Message: Updated database successfully

I really don't know why it didn't work yesterday. Has anybody head
similar error/problem? Now I wonder, is it stable enough for production use?
--
Tomislav Parcina
***@email.t-com.hr
Loading...