Skip to content

Commit 696ed8b

Browse files
authored
Merge pull request #98 from finntenzor/master
Add "rport" in via to support NAT.
2 parents b1a96c2 + 457c12f commit 696ed8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/stack/stack.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func (s *SipStack) handleRequest(req sip.Request, tx sip.ServerTransaction) {
291291
go handler(req, tx)
292292
}
293293

294-
//Request Send SIP message
294+
// Request Send SIP message
295295
func (s *SipStack) Request(req sip.Request) (sip.ClientTransaction, error) {
296296
if !s.running.IsSet() {
297297
return nil, fmt.Errorf("can not send through stopped server")
@@ -378,6 +378,7 @@ func (s *SipStack) prepareRequest(req sip.Request) sip.Request {
378378
ProtocolName: "SIP",
379379
ProtocolVersion: "2.0",
380380
Params: sip.NewParams().
381+
Add("rport", nil).
381382
Add("branch", sip.String{Str: sip.GenerateBranch()}),
382383
}
383384

0 commit comments

Comments
 (0)