diff --git a/pkg/service/service.go b/pkg/service/service.go index fb087315..d329cd2a 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -221,7 +221,7 @@ func (s *Service) DispatchCall(ctx context.Context, info *sip.CallInfo) sip.Call return DispatchCall(ctx, s.psrpcClient, s.log, info) } -func (s *Service) GetMediaProcessor(_ []livekit.SIPFeature, _ map[string]string) msdk.PCM16Processor { +func (s *Service) GetMediaProcessor(_ []livekit.SIPFeature, _ map[string]string, _ string) msdk.PCM16Processor { return nil } diff --git a/pkg/sip/inbound.go b/pkg/sip/inbound.go index 03ea92ec..2f780d02 100644 --- a/pkg/sip/inbound.go +++ b/pkg/sip/inbound.go @@ -1005,7 +1005,7 @@ func (c *inboundCall) runMediaConn(tid traceid.ID, offerData []byte, enc livekit c.mon.SDPSize(len(answerData), false) c.log().Debugw("SDP answer", "sdp", string(answerData)) - mconf.Processor = c.s.handler.GetMediaProcessor(features, featureFlags) + mconf.Processor = c.s.handler.GetMediaProcessor(features, featureFlags, c.call.LkCallId) if err = c.media.SetConfig(mconf); err != nil { return nil, err } diff --git a/pkg/sip/outbound.go b/pkg/sip/outbound.go index 4c1823fa..e3f65a5c 100644 --- a/pkg/sip/outbound.go +++ b/pkg/sip/outbound.go @@ -653,7 +653,7 @@ func (c *outboundCall) sipSignal(ctx context.Context, tid traceid.ID) error { if err != nil { return err } - mc.Processor = c.c.handler.GetMediaProcessor(c.sipConf.enabledFeatures, c.sipConf.featureFlags) + mc.Processor = c.c.handler.GetMediaProcessor(c.sipConf.enabledFeatures, c.sipConf.featureFlags, string(c.cc.ID())) if err = c.media.SetConfig(mc); err != nil { return err } diff --git a/pkg/sip/server.go b/pkg/sip/server.go index 5700196a..436b1d78 100644 --- a/pkg/sip/server.go +++ b/pkg/sip/server.go @@ -120,7 +120,7 @@ type CallIdentifier struct { type Handler interface { GetAuthCredentials(ctx context.Context, call *rpc.SIPCall) (AuthInfo, error) DispatchCall(ctx context.Context, info *CallInfo) CallDispatch - GetMediaProcessor(features []livekit.SIPFeature, featureFlags map[string]string) msdk.PCM16Processor + GetMediaProcessor(features []livekit.SIPFeature, featureFlags map[string]string, callID string) msdk.PCM16Processor RegisterTransferSIPParticipantTopic(sipCallId string) error DeregisterTransferSIPParticipantTopic(sipCallId string) diff --git a/pkg/sip/service_test.go b/pkg/sip/service_test.go index 84e23aa0..5173d103 100644 --- a/pkg/sip/service_test.go +++ b/pkg/sip/service_test.go @@ -100,7 +100,7 @@ func (h TestHandler) DispatchCall(ctx context.Context, info *CallInfo) CallDispa } } -func (h TestHandler) GetMediaProcessor(_ []livekit.SIPFeature, _ map[string]string) msdk.PCM16Processor { +func (h TestHandler) GetMediaProcessor(_ []livekit.SIPFeature, _ map[string]string, _ string) msdk.PCM16Processor { return nil }