Summary:ASTERISK-15748: [patch] DBGet response does not end with a 'Complete' event
Reporter:Ryan Bullock (rrb3942)Labels:
Date Opened:2010-03-04 14:45:30.000-0600Date Closed:2010-06-11 13:17:30
Versions:Frequency of
Environment:Attachments:( 0) DBGetComplete.patch
Description:DBGet returns its response as an event, but it does not send a 'Complete' event.

For example take this Action -

Action: DBGet
Family: Foo
Key: bar
ActionID: 1

How it responds now -

Response: Success
Message: Result will follow
ActionID: 1

Event: DBGetResponse
Family: Foo
Key: bar
Value: sip123
ActionID: 1

How it should respond -

Response: Success
Message: Result will follow
ActionID: 1

Event: DBGetResponse
Family: Foo
Key: bar
Value: sip123
ActionID: 1

Event: DBGetComplete
ActionID: 1

This will bring DBGet in line with how other manager actions behave when responding with events.


Not a big issue, but it should be done for consistency in how the the manager interface behaves. Also prevents people from having to create exceptions for varying behavior when interfacing with the manager.
Comments:By: Ryan Bullock (rrb3942) 2010-03-04 14:50:15.000-0600

Made a mistake in my response examples. Responses should contain 'Val', not 'Value'.

By: Ryan Bullock (rrb3942) 2010-03-05 12:46:31.000-0600

I have uploaded a patch that adds the 'Event: DBGetComplete'. The patch was made against trunk, but applied against fine.

By: Leif Madsen (lmadsen) 2010-03-08 09:51:37.000-0600

Thanks for the submission! I agree this is a good change.

Feel free to ping the asterisk-dev and/or asterisk-users mailing lists to try and get some testers.

By: Olle Johansson (oej) 2010-03-11 09:19:40.000-0600

I would like a header for the number of results as well. In many "Complete" messages, there's a counter.

By: Ryan Bullock (rrb3942) 2010-03-11 14:49:19.000-0600

I saw that some of the newer actions added in 1.6 started adding counters. But I don't really understand what purpose they serve. In my opinion it doesn't really help the receiving end at all.

The manager runs over TCP, so if a packet is lost/dropped/corrupted it will be retransmitted and it will be re-assembled on the remote end in the correct order before being passed up the networks stack. So, if you receive the 'Complete' you have received all the responses.

Maybe I am missing something, a specific use case or something but it just doesn't seem useful.
Granted it should be easy to add, the question is just why?

By: Leif Madsen (lmadsen) 2010-03-15 13:23:42

I'm not too sure either (based on your description).

I suppose you could put this in reviewboard, and if a developer feels that is necessary, they can comment there (or here) further about the counters.

By: Ryan Bullock (rrb3942) 2010-05-03 15:02:05

Mailing list link:


By: Ryan Bullock (rrb3942) 2010-05-13 09:21:03

What else can I do to get this moving along? Can't seem to stir up any responses on the mailing list.

By: Leif Madsen (lmadsen) 2010-05-17 11:06:20

There's nothing further for you to do right now. As soon as time and resources allow this issue will be moved forward unless a community developer takes it forward first.

By: Leif Madsen (lmadsen) 2010-05-17 11:06:42

This might be a good issue for you to look at?

By: Digium Subversion (svnbot) 2010-06-11 13:17:28

Repository: asterisk
Revision: 269938

U   trunk/CHANGES
U   trunk/main/db.c

r269938 | tilghman | 2010-06-11 13:17:28 -0500 (Fri, 11 Jun 2010) | 7 lines

Add DBGetComplete event after a DBGetResponse.

(closes issue ASTERISK-15748)
Reported by: rrb3942
      DBGetComplete.patch uploaded by rrb3942 (license 1003)