From 298649eb68d6f2eec16e3bb50ab1e365bcff998e Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Thu, 11 Jan 2024 18:39:23 +0200 Subject: [PATCH] Only play room join audio if already asked for pin (#47) Only play room join audio if already asked for pin. --- pkg/sip/inbound.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sip/inbound.go b/pkg/sip/inbound.go index 57e45f4a..22653b9b 100644 --- a/pkg/sip/inbound.go +++ b/pkg/sip/inbound.go @@ -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 } @@ -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")