@@ -39,6 +39,7 @@ import (
3939 "github.com/livekit/sipgo"
4040
4141 "github.com/livekit/sip/pkg/config"
42+ siperrors "github.com/livekit/sip/pkg/errors"
4243 "github.com/livekit/sip/pkg/stats"
4344 "github.com/livekit/sip/version"
4445)
@@ -267,7 +268,8 @@ func (s *Service) Start() error {
267268}
268269
269270func (s * Service ) CreateSIPParticipant (ctx context.Context , req * rpc.InternalCreateSIPParticipantRequest ) (* rpc.InternalCreateSIPParticipantResponse , error ) {
270- return s .cli .CreateSIPParticipant (ctx , req )
271+ resp , err := s .cli .CreateSIPParticipant (ctx , req )
272+ return resp , siperrors .ApplySIPStatus (err )
271273}
272274
273275func (s * Service ) CreateSIPParticipantAffinity (ctx context.Context , req * rpc.InternalCreateSIPParticipantRequest ) float32 {
@@ -276,6 +278,11 @@ func (s *Service) CreateSIPParticipantAffinity(ctx context.Context, req *rpc.Int
276278}
277279
278280func (s * Service ) TransferSIPParticipant (ctx context.Context , req * rpc.InternalTransferSIPParticipantRequest ) (* emptypb.Empty , error ) {
281+ resp , err := s .transferSIPParticipant (ctx , req )
282+ return resp , siperrors .ApplySIPStatus (err )
283+ }
284+
285+ func (s * Service ) transferSIPParticipant (ctx context.Context , req * rpc.InternalTransferSIPParticipantRequest ) (* emptypb.Empty , error ) {
279286 s .log .Infow ("transferring SIP call" , "callID" , req .SipCallId , "transferTo" , req .TransferTo )
280287
281288 // Check if provider is internal and config is set before allowing transfer
0 commit comments