Skip to content

Commit 8c4e964

Browse files
authored
Add contact for error statuses. (#511)
1 parent 12c9f74 commit 8c4e964

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/sip/inbound.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,6 +1442,10 @@ func (c *sipInbound) respond(status sip.StatusCode, reason string) {
14421442

14431443
r := sip.NewResponseFromRequest(c.invite, status, reason, nil)
14441444
r.AppendHeader(sip.NewHeader("Allow", "INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE"))
1445+
if status >= 200 {
1446+
// For an ACK to error statuses.
1447+
r.AppendHeader(c.contact)
1448+
}
14451449
c.addExtraHeaders(r)
14461450
_ = c.inviteTx.Respond(r)
14471451
}

0 commit comments

Comments
 (0)