Opened 9 years ago

Last modified 9 years ago

#1825 closed enhancement

New on_reg_started2 callback — at Initial Version

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

Description

On IP Address change case, app might want to close the transport before
connecting state.
Example scenario:

  1. Connecting to network A (3G)
  2. Check if a transport is saved. Finding None so go on.
  3. Register requested (and account created)
  4. Transport created in PJSIP
  5. Connecting to network B (WIFI)
  6. Register request on network B (old account destroyed and new one created)
  7. Check if a transport is saved. Finding None so go on.
  8. Transport A and transport B connect (may happen in an iphone since the 3G connection is never really lost).
  9. Transport A is saved and then transport B is saved in its stead
  10. If on transport connect we also check if there is already a transport connected and then release the old one (which we are doing at the time), then if by chance transport B connects first, then network A would actually cause a release of transport B which is the latest one
  11. Otherwise, transport A is never released.

on_reg_started callback can be used for this purpose, but we need to include
pjsua_internal.h to get the transport reference. Thus new callback is needed
with the sufficient information.

Change History (0)

Note: See TracTickets for help on using tickets.