I came across the problem in the external media Feature the problem is if set the connection in
/etc/asterisk/websocket_client.conf
[rtp_engine]
;type = websocket_client ; Must be "websocket_client"
type = websocket_client
;connection_type = persistent : "persistent" or "per_call_config"
; Default: none
connection_type = per_call_config
;uri = ws://localhost:8765 ; The URI needed to contact the remote server.
; If you've enabled tls, use "wss" for the scheme.
; Default: none
uri = ws://streamimg-media-flow
;protocols = ari ; The websocket protocol expected by the server.
; Default: none
;username = username ; An authentication username if required by the server.
; Default: none
;password = password ; The authentication password for the username.
; Default: none
;connection_timeout = 500 ; Connection timeout in milliseconds.
; Default: 500
;reconnect_interval = 1000 ; Number of milliseconds between (re)connection
; attempts.
; Default: 500
;reconnect_attempts = 4
The problem is the us url is the loadbalancer and the request comes to that and then goes to backend ws server now the problem is there is not identifier that can tell the loadbalancer or any previlede that that websocket unique channel_id comes in the header part of that websocket request and thoguht the we can manage the logic if we want to route that call of streamId to a specific server, It is really usefull when it comes to build custom logic and handle the load distribution on the load balancer level on the basis of any Unique Call identifier that we can receive and for this case i believe that is channel_id ,
how can we do that ?? or we can have the privelege to set the dynamic host and port of the websocekt while creating the external media instead of getting it from the conf file
I believe that this is a needful change that we can do
Error: {
“message”: “external_host must be a valid websocket_client connection id.”
}
at SwaggerRequest.swaggerError [as errorCallback] (/var/www/servetel_v3.0_nodejs/node_modules/ari-client/lib/resources.js:944:19)
at Object.error (/var/www/servetel_v3.0_nodejs/node_modules/swagger-client/lib/swagger.js:1077:24)
at EventEmitter.error (/var/www/servetel_v3.0_nodejs/node_modules/swagger-client/lib/swagger.js:1296:19)
at EventEmitter.emit (node:events:518:28)
at emit (/var/www/servetel_v3.0_nodejs/node_modules/shred/lib/shred/request.js:454:21)
at /var/www/servetel_v3.0_nodejs/node_modules/shred/lib/shred/request.js:473:9
at setBodyAndFinish (/var/www/servetel_v3.0_nodejs/node_modules/shred/lib/shred/response.js:103:7)
at IncomingMessage. (/var/www/servetel_v3.0_nodejs/node_modules/shred/lib/shred/response.js:120:7)
at IncomingMessage.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v20.11.0
so i am not able to use this functionality using ari api’s