Skip to content

Commit

Permalink
Merge pull request #69 from negbie/master
Browse files Browse the repository at this point in the history
Check for valid SIP response
  • Loading branch information
negbie committed May 30, 2018
2 parents e89164f + fb5c6d5 commit aa0c45d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func (h *HEP) parseSIP() error {
if h.SIP.StartLine.Method == "" {
h.SIP.StartLine.Method = h.SIP.StartLine.Resp
}
if h.SIP.StartLine.Method != h.SIP.CseqMethod && len(h.SIP.StartLine.Method) != 3 {
h.SIP.StartLine.Method = "UNKNOWN"
}

if h.SIP.Error != nil {
return h.SIP.Error
Expand Down

0 comments on commit aa0c45d

Please sign in to comment.