mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
26 lines
465 B
Go
26 lines
465 B
Go
package databag
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
//KeepCall keeps call and signaling alive
|
|
func KeepCall(w http.ResponseWriter, r *http.Request) {
|
|
|
|
account, code, err := ParamAgentToken(r, false)
|
|
if err != nil {
|
|
ErrResponse(w, code, err)
|
|
return
|
|
}
|
|
|
|
var callId string
|
|
if err := ParseRequest(r, w, &callId); err != nil {
|
|
ErrResponse(w, http.StatusBadRequest, err)
|
|
return
|
|
}
|
|
|
|
bridgeRelay.KeepAlive(account.ID, callId);
|
|
WriteResponse(w, nil);
|
|
}
|
|
|