The rtpengine-proxy's POST /v1/commands endpoint currently handles NG protocol
commands as an implicit fallthrough — any request without a recognized type field
gets forwarded to RTPEngine. This creates ambiguity: unknown type values silently
fall through, and there's no explicit routing for NG commands.
-
Add a
models/command/package to rtpengine-proxy withTypeconstants (ng,exec,kill) and aCommandstruct that captures typed fields plus the raw payload asData. -
Update
listenhandler/command.goto:- Parse incoming JSON into the hybrid
Commandstruct - Switch on
cmd.Typeusing constants - Route
ngto a newprocessNG()handler - Return 400 for missing or unknown types
- Parse incoming JSON into the hybrid
-
Update
bin-call-manager/pkg/callhandler/rtpdebug.goto add"type": "ng"to the query command sent to rtpengine-proxy.
voip-rtpengine-proxy/models/command/command.go(new)voip-rtpengine-proxy/pkg/listenhandler/command.govoip-rtpengine-proxy/pkg/listenhandler/command_test.govoip-rtpengine-proxy/pkg/listenhandler/main_test.gobin-call-manager/pkg/callhandler/rtpdebug.gobin-call-manager/pkg/callhandler/status_test.go(if NG command assertions exist)
- Breaking change: callers that omit
typewill now get 400 instead of NG forwarding. Acceptable because the only caller is call-manager (which we update in the same PR).