Skip to content

Commit

Permalink
handle negative result codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulexus committed Jul 24, 2018
1 parent 81d4928 commit 16a0ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agi.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *Response) Val() (string, error) {
}

// Regex for AGI response result code and value
var responseRegex = regexp.MustCompile(`^([\d]{3})\sresult=([[:alnum:]]*)(\s.*)?$`)
var responseRegex = regexp.MustCompile(`^([\d]{3})\sresult=(\-?[[:alnum:]]*)(\s.*)?$`)

const (
// StatusOK indicates the AGI command was
Expand Down

0 comments on commit 16a0ce2

Please sign in to comment.