Skip to content

Commit

Permalink
Changed how return value of WaitForDigit is built
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Boscarino committed Jan 7, 2019
1 parent f33928b commit 21d5c4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agi.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,5 +413,6 @@ func (a *AGI) Verbose(msg string, level int) error {

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

0 comments on commit 21d5c4a

Please sign in to comment.