mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
fix postwait on sip server for dtmf response
This commit is contained in:
@@ -191,7 +191,6 @@ func (scs *SIPCallServer) Output(ctx context.Context, payload any) error {
|
||||
|
||||
if ok {
|
||||
dtmfWriter := call.inDialog.AudioWriterDTMF()
|
||||
|
||||
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PreWait))
|
||||
for i, dtmfRune := range payloadDTMFResponse.Digits {
|
||||
err := dtmfWriter.WriteDTMF(dtmfRune)
|
||||
@@ -200,7 +199,7 @@ func (scs *SIPCallServer) Output(ctx context.Context, payload any) error {
|
||||
return fmt.Errorf("sip.dtmf.server error output dtmf digit at index %d", i)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PreWait))
|
||||
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PostWait))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ func (sds *SIPDTMFServer) Output(ctx context.Context, payload any) error {
|
||||
return fmt.Errorf("sip.dtmf.server error output dtmf digit at index %d", i)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PreWait))
|
||||
time.Sleep(time.Millisecond * time.Duration(payloadDTMFResponse.PostWait))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user