[Asterisk-Dev] Manager multiple results commands

Peter Svensson psvasterisk at psv.nu
Sat Apr 2 04:06:56 MST 2005


On Sat, 2 Apr 2005, Olle E. Johansson wrote:

> While working with the manager proxy problem, I realized why I did not 
> like the multiple event listings, like "status" and "SIPpeers".
> 
> There's no way for the manager proxy to understand these commands unless 
> we hardcode the command names. We need a generic way of saying that 
> "Following this "success" reply comes list of stuff in separate events" 
> and "list of stuff in events finished".
> 
> With that syntax added, a manager proxy can understand how to handle 
> these events and somehow cache them into a big chunk before converting 
> to something else, like EBCDIC text files.

Is there any reason to send the result as separate events and not in the 
main reply? If we want to avoid duplicate labels in the reply then a 
sequence number could be appended to the label. E.g.

  Result: Success
  Gizmo: true
  Foo-1: a
  Bar-1: b
  Foo-2: c
  Bar-2: d
  ...

The separate events used at the moment breaks the command-response 
pattern. I would prefer of the events mechanism was used only for 
unsolicited events.

Peter




More information about the asterisk-dev mailing list