OpenSIPS / call-api

Call API is a front-end layer for managing advanced SIP call flows. It listens for WebSocket connections and talks JSON-RPC 2.0 over them.
GNU General Public License v3.0
51 stars 22 forks source link

added wsserver flag to call-api-client tool #10

Closed byoungdale closed 1 year ago

byoungdale commented 1 year ago

I added a flag wsserver to the call-api-client since it was pulling from the config, but that config is for the call-api server and won't always match what the call-api-client wants to reach.

For example, my call-api-client command looked like this:

docker run --network opensips-network opensips-call-api:latest call-api-client \
  -wsserver opensips-call-api \
  -method CallStart \
  -params '{"caller": "sip:alice@localhost", "callee": "sip:bob@localhost"}'

Not 100% sure if this will be useful to others. But, it help with my local docker development.

I could also see it being useful in production. If you want to test with the client against your call-api server, and you don't want to have a config locally that you keep up to date with production. With this you can quickly pass in the wsserver value.

byoungdale commented 1 year ago

Ah, thank you. It felt too hack-y. I will rework it so it's backwards compatible and handles the port.