From af5db1b5f6173cf4c9c90bf3324a6d8a261f1801 Mon Sep 17 00:00:00 2001 From: chaslin Date: Sun, 28 Jun 2020 00:34:55 +0800 Subject: [PATCH] fix: use real port to request and add go.mod --- sip/route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sip/route.go b/sip/route.go index b414370..613c191 100644 --- a/sip/route.go +++ b/sip/route.go @@ -83,7 +83,7 @@ func RouteMessage(via *Via, contact *Addr, msg *Msg) (host string, port uint16, // we should use rport as real port in request-line if rport := msg.Via.Param.Get("rport"); rport != nil && len(rport.Value) > 0 { - i, err := strconv.ParseInt(rport.Value, 10, 16) + i, err := strconv.Atoi(rport.Value) if err != nil { return "", 0, err }