| 27 | } |
| 28 | |
| 29 | func (s *Server) bridgeCreate(ctx context.Context, reply string, req *proxy.Request) { |
| 30 | // bind dialog |
| 31 | if req.Key.Dialog != "" { |
| 32 | s.Dialog.Bind(req.Key.Dialog, "bridge", req.Key.ID) |
| 33 | } |
| 34 | |
| 35 | h, err := s.ari.Bridge().Create(req.Key, req.BridgeCreate.Type, req.BridgeCreate.Name) |
| 36 | if err != nil { |
| 37 | s.sendError(reply, err) |
| 38 | return |
| 39 | } |
| 40 | |
| 41 | s.publish(reply, &proxy.Response{ |
| 42 | Key: h.Key(), |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | func (s *Server) bridgeStageCreate(ctx context.Context, reply string, req *proxy.Request) { |
| 47 | bh := s.ari.Bridge().Get(req.Key) |