move any helper methods to common and reuse for params getter

This commit is contained in:
Joel Wetzell
2026-03-10 18:14:30 -05:00
parent 65476d5ecc
commit 5a0f21bd64
36 changed files with 373 additions and 355 deletions

View File

@@ -173,7 +173,7 @@ func (scs *SIPCallServer) Output(ctx context.Context, payload any) error {
return errors.New("sip.call.server inDialog already ended")
}
payloadDTMFResponse, ok := processor.GetAnyAs[processor.SipDTMFResponse](payload)
payloadDTMFResponse, ok := common.GetAnyAs[processor.SipDTMFResponse](payload)
if ok {
dtmfWriter := call.inDialog.AudioWriterDTMF()
@@ -189,7 +189,7 @@ func (scs *SIPCallServer) Output(ctx context.Context, payload any) error {
return nil
}
payloadAudioFileResponse, ok := processor.GetAnyAs[processor.SipAudioFileResponse](payload)
payloadAudioFileResponse, ok := common.GetAnyAs[processor.SipAudioFileResponse](payload)
if ok {
audioFile, err := os.Open(payloadAudioFileResponse.AudioFile)