Skip to content

Commit 21d5c4a

Browse files
author
Francesco Boscarino
committed
Changed how return value of WaitForDigit is built
1 parent f33928b commit 21d5c4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

agi.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,5 +413,6 @@ func (a *AGI) Verbose(msg string, level int) error {
413413

414414
// WaitForDigit waits for a DTMF digit and returns what is received
415415
func (a *AGI) WaitForDigit(timeout time.Duration) (digit string, err error) {
416-
return a.Command("WAIT FOR DIGIT", toMSec(timeout)).Val()
416+
resp := a.Command("WAIT FOR DIGIT", toMSec(timeout))
417+
return string(resp.Result), resp.Error
417418
}

0 commit comments

Comments
 (0)