Skip to content

Commit

Permalink
Fix destination address.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Nov 20, 2023
1 parent 65fcaad commit 0ad5b76
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/sip/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func (c *inboundCall) closeMedia() {
}

func (c *inboundCall) createMediaSession() (*net.UDPAddr, error) {
var rtpDestination atomic.Value
conn, err := net.ListenUDP("udp", &net.UDPAddr{
Port: 0,
IP: net.ParseIP("0.0.0.0"),
Expand All @@ -82,8 +81,8 @@ func (c *inboundCall) createMediaSession() (*net.UDPAddr, error) {
},
}
c.media.mix = mixer.NewMixer(func(audioSample []byte) {
dstAddr, ok := rtpDestination.Load().(*net.UDPAddr)
if !ok || dstAddr == nil {
dstAddr := c.media.dest.Load()
if dstAddr == nil {
return
}

Expand Down

0 comments on commit 0ad5b76

Please sign in to comment.