Opened 15 years ago

Closed 14 years ago

#864 closed enhancement (fixed)

Revise on account registration Contact update rule

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.5
Component: pjsua-lib Version: trunk
Keywords: sipit24 Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

Handle But in NAT Router

Some firewall such as Microsoft Forefront Threat Management Gateway may leave rport parameter with wrong port number, causing us to update our registration Contact with wrong URI.

For example, when we're behind NAT and we're registering to server in public Internet:

  • our original Via header in the request:

Via: SIP/2.0/UDP 10.0.0.1;rport;branch=xyz

  • Via value in the response, after the server's response passes through the firewall:

Via: SIP/2.0/UDP 10.0.0.1;rport=56284;branch=xyz

Probably we don't need to do registration update when only the port number changes.

Always Update Via Address

While the Contact address is updated by acc_check_nat_addr() function, the Via (i.e. transport address) is only updated if the transport is UDP and STUN is enabled.

For TCP/TLS, this is a bug, as the Via address should always be updated.

For UDP, probably it's better to always update it too, as some server will still think that we're behind NAT (while probably true, we want the server to think otherwise).

Change History (9)

comment:1 Changed 15 years ago by bennylp

  • Description modified (diff)

comment:2 Changed 15 years ago by bennylp

  • Milestone changed from Sipit24 to release-1.3
  • Version changed from Sipit24 to trunk

comment:3 Changed 15 years ago by bennylp

  • Keywords sipit24 added

comment:4 Changed 15 years ago by bennylp

  • Milestone changed from release-1.3 to release-1.4

comment:5 Changed 15 years ago by bennylp

  • Milestone changed from release-1.4 to release-1.5

comment:6 Changed 14 years ago by bennylp

  • Milestone changed from release-1.5 to release-1.6

comment:7 Changed 14 years ago by bennylp

  • Description modified (diff)

comment:8 Changed 14 years ago by bennylp

  • Description modified (diff)
  • Milestone changed from release-1.6 to release-1.5

comment:9 Changed 14 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3001:

  • don't switch if only port number is different and the Via received address is private
  • always update the transport (i.e. Via) address as well
Note: See TracTickets for help on using tickets.