2023-03-20 04:46:10 +00:00
|
|
|
package databag
|
|
|
|
|
|
|
|
import (
|
2023-03-21 20:56:09 +00:00
|
|
|
"net/http"
|
2023-03-24 07:37:06 +00:00
|
|
|
"github.com/gorilla/mux"
|
2023-03-20 04:46:10 +00:00
|
|
|
)
|
|
|
|
|
2023-03-21 20:56:09 +00:00
|
|
|
//KeepCall keeps call and signaling alive
|
2023-03-20 04:46:10 +00:00
|
|
|
func KeepCall(w http.ResponseWriter, r *http.Request) {
|
2023-03-21 20:56:09 +00:00
|
|
|
|
|
|
|
account, code, err := ParamAgentToken(r, false)
|
|
|
|
if err != nil {
|
|
|
|
ErrResponse(w, code, err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2023-03-24 07:37:06 +00:00
|
|
|
params := mux.Vars(r)
|
|
|
|
callId := params["callId"]
|
2023-03-21 20:56:09 +00:00
|
|
|
|
|
|
|
bridgeRelay.KeepAlive(account.ID, callId);
|
|
|
|
WriteResponse(w, nil);
|
2023-03-20 04:46:10 +00:00
|
|
|
}
|
2023-03-21 20:56:09 +00:00
|
|
|
|