Skip to content

Commit

Permalink
Merge pull request #4 from bizmate-oss/master
Browse files Browse the repository at this point in the history
Changed how return value of WaitForDigit is built
  • Loading branch information
Ulexus authored Jan 10, 2019
2 parents f33928b + 21d5c4a commit b58016a
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 b58016a

Please sign in to comment.