From cbd22c0aeab37db95454de6d2c22ac950c608c40 Mon Sep 17 00:00:00 2001 From: hateeyan Date: Wed, 19 Jun 2024 13:42:06 +0800 Subject: [PATCH] fix: ACK request does not convert the Record-Route headers into Route headers Signed-off-by: hateeyan --- sip/request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sip/request.go b/sip/request.go index 5381793..242b451 100644 --- a/sip/request.go +++ b/sip/request.go @@ -235,8 +235,8 @@ func NewAckRequest(inviteRequest *Request, inviteResponse *Response, body []byte // https://datatracker.ietf.org/doc/html/rfc2543#section-6.29 hdrs := inviteResponse.GetHeaders("Record-Route") for i := len(hdrs) - 1; i >= 0; i-- { - h := hdrs[i].headerClone() - ackRequest.AppendHeader(h) + recordRoute := hdrs[i] + ackRequest.AppendHeader(NewHeader("Route", recordRoute.Value())) } }