nvisibleinc / go-ari-proxy

Asterisk REST Interface proxy system written in Go
Apache License 2.0
31 stars 17 forks source link

Please provide example of RabbitMQ message for command syntax #35

Open tdenton8772 opened 6 years ago

tdenton8772 commented 6 years ago

I am trying to use a simple rabbitMQ consumer and producer for interacting with the ARI proxy and cannot seem to get the syntax correct for sending commands. Can you please update the readme to include an example of how the json should be formatted for the message to be processed. Right now I I am only having this experience regardless of what I send in.

DEBUG: 2017/12/13 23:40:22 go-ari-proxy.go:332: jsonCommand is {"url":"/bridges/EPLX6NMHBBRFI6BARID6KOOAG4XSLKG/record", "body": {"name":"EPLX6NMHBBRFI6BARID6KOOAG4XSLKG", "format":""}}
DEBUG: 2017/12/13 23:40:22 go-ari-proxy.go:346: fullURL is http://<hidden>:8088/ari/bridges/EPLX6NMHBBRFI6BARID6KOOAG4XSLKG/record?api_key=<hidden>:<hidden>
DEBUG: 2017/12/13 23:40:22 go-ari-proxy.go:352: Response body is {"message":"Invalid method"}
DEBUG: 2017/12/13 23:40:22 go-ari-proxy.go:366: sendJSON is {"unique_id":"","status_code":405,"response_body":"{\"message\":\"Invalid method\"}"}
leifmadsen commented 6 years ago

@tdenton8772 thanks for trying this out! Just FYI that primarily go-ari-proxy is tested with NATS, so I'm not sure if things have changed with RabbitMQ where there could possibly be a bug here.

Can you provide an example of what you're currently attempting to send to RabbitMQ?

@Marquis42 is there anything obviously wrong here?