Skip to content

Commit

Permalink
Only play room join audio if already asked for pin (#47)
Browse files Browse the repository at this point in the history
Only play room join audio if already asked for pin.
  • Loading branch information
dennwc authored Jan 11, 2024
1 parent c62ffca commit 298649e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sip/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ func (c *inboundCall) pinPrompt(ctx context.Context) {
c.close("wrong-pin")
return
}
c.playAudio(ctx, c.s.res.roomJoin)
c.joinRoom(ctx, roomName, identity, wsUrl, token)
return
}
Expand Down Expand Up @@ -431,7 +432,6 @@ func (c *inboundCall) joinRoom(ctx context.Context, roomName, identity, wsUrl, t
}
c.callDur = c.mon.CallDur()
logger.Infow("Bridging SIP call", "tag", c.tag, "from", c.from.Address.User, "to", c.to.Address.User, "roomName", roomName, "identity", identity)
c.playAudio(ctx, c.s.res.roomJoin)
if err := c.createLiveKitParticipant(ctx, roomName, identity, wsUrl, token); err != nil {
logger.Errorw("Cannot create LiveKit participant", err, "tag", c.tag)
c.close("participant-failed")
Expand Down

0 comments on commit 298649e

Please sign in to comment.