MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / channelRecord

Method channelRecord

server/channel.go:241–260  ·  view source on GitHub ↗
(ctx context.Context, reply string, req *proxy.Request)

Source from the content-addressed store, hash-verified

239}
240
241func (s *Server) channelRecord(ctx context.Context, reply string, req *proxy.Request) {
242 if req.ChannelRecord.Name == "" {
243 req.ChannelRecord.Name = rid.New(rid.Recording)
244 }
245
246 if req.Key.Dialog != "" {
247 s.Dialog.Bind(req.Key.Dialog, "channel", req.Key.ID)
248 s.Dialog.Bind(req.Key.Dialog, "recording", req.ChannelRecord.Name)
249 }
250
251 h, err := s.ari.Channel().Record(req.Key, req.ChannelRecord.Name, req.ChannelRecord.Options)
252 if err != nil {
253 s.sendError(reply, err)
254 return
255 }
256
257 s.publish(reply, &proxy.Response{
258 Key: h.Key(),
259 })
260}
261
262func (s *Server) channelStageRecord(ctx context.Context, reply string, req *proxy.Request) {
263 data, err := s.ari.Channel().Data(req.Key)

Callers

nothing calls this directly

Calls 6

sendErrorMethod · 0.95
publishMethod · 0.95
NewMethod · 0.80
ChannelMethod · 0.80
BindMethod · 0.65
RecordMethod · 0.45

Tested by

no test coverage detected