Opened 11 years ago

Last modified 10 years ago

#1677 closed enhancement

Contact uses source port in initial registration — at Initial Version

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

Description

Currently Contact header for initial registration will always use listening port. There is a report that this causes problem in incoming call, see the following scenario:

  1. Client A and server both use private IP, client sets allow_contact_rewrite==1 or 0.
  2. Initial registration succeeds with listening port in Contact, note that there is no Contact update even Via rport is different with Contact port (note that allow_contact_rewrite==1 won't trigger Contact update when both using private IP)
  3. Client B makes call to client A
  4. Server tries to connect to client A, i.e: to A Contact address, and it fails (as client is not ready for accepting TLS, e.g: no TLS cert is set), so call is not passed through to client A.

Setting allow_contact_rewrite==2 is reported to solve the problem, however for some reason, such Contact update mechanism may not be preferred/allowed on some system setup. So in this case, adding option setting for using source port in initial registration Contact is needed.

Note: for some platform, there may be problem in getting source port on async socket connect operation.

Change History (0)

Note: See TracTickets for help on using tickets.