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

Method asteriskVariableGet

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

Source from the content-addressed store, hash-verified

21}
22
23func (s *Server) asteriskVariableGet(ctx context.Context, reply string, req *proxy.Request) {
24 val, err := s.ari.Asterisk().Variables().Get(req.Key)
25 if err != nil {
26 s.sendError(reply, err)
27 return
28 }
29
30 s.publish(reply, &proxy.Response{
31 Data: &proxy.EntityData{
32 Variable: val,
33 },
34 })
35}
36
37func (s *Server) asteriskVariableSet(ctx context.Context, reply string, req *proxy.Request) {
38 err := s.ari.Asterisk().Variables().Set(req.Key, req.AsteriskVariableSet.Value)

Callers

nothing calls this directly

Calls 5

sendErrorMethod · 0.95
publishMethod · 0.95
VariablesMethod · 0.80
AsteriskMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected