Skip to content

Commit

Permalink
fix: reuse UDP connection only if server listening
Browse files Browse the repository at this point in the history
  • Loading branch information
emiago committed Nov 24, 2024
1 parent 600dc94 commit 737227c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diago.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func (dg *Diago) InviteBridge(ctx context.Context, recipient sip.Uri, bridge *Br
via := inviteReq.Via()
if transport == "udp" && via.Port == 0 {
via.Host = tran.BindHost
via.Port = tran.BindPort
via.Port = dg.server.TransportLayer().GetListenPort("udp")
}

dialog, err := dialogCli.WriteInvite(ctx, inviteReq, func(c *sipgo.Client, req *sip.Request) error {
Expand Down

0 comments on commit 737227c

Please sign in to comment.