Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Oct 28, 2024
1 parent 2db6c26 commit 5771c04
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/sip/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,17 @@ func (c *outboundCall) Start(ctx context.Context) {
defer c.mon.CallEnd()
ok := c.ConnectSIP(ctx)
if !ok {
return
return // ConnectSIP updates the error code on the callInfo
}

c.callInfo.RoomId = c.lkRoom.room.SID()
c.callInfo.StartedAt = time.Now().UnixNano()
c.callInfo.CallStatus = livekit.SIPCallStatus_SCS_ACTIVE

c.c.ioClient.UpdateSIPCallState(context.WithoutCancel(ctx), &rpc.UpdateSIPCallStateRequest{
CallInfo: c.callInfo,
})

select {
case <-c.Disconnected():
c.CloseWithReason(callDropped, "removed", livekit.DisconnectReason_CLIENT_INITIATED)
Expand Down

0 comments on commit 5771c04

Please sign in to comment.