Skip to content

Commit

Permalink
fix: honor lr in record route for dialog clients
Browse files Browse the repository at this point in the history
  • Loading branch information
InnovativeUS authored and emiago committed Jun 18, 2024
1 parent 93032fc commit c3a66e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dialog_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,13 @@ func (s *DialogClientSession) TransactionRequest(ctx context.Context, req *sip.R
}

if rr := s.InviteResponse.RecordRoute(); rr != nil {
req.SetDestination(rr.Address.HostPort())
if rr.Address.UriParams.Has("lr") {
req.AppendHeader(&sip.RouteHeader{
Address: rr.Address,
})
} else {
req.SetDestination(rr.Address.HostPort())
}
}
}

Expand Down

0 comments on commit c3a66e2

Please sign in to comment.