Opened 10 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:
- Connecting to network A (3G)
- Check if a transport is saved. Finding None so go on.
- Register requested (and account created)
- Transport created in PJSIP
- Connecting to network B (WIFI)
- Register request on network B (old account destroyed and new one created)
- Check if a transport is saved. Finding None so go on.
- Transport A and transport B connect (may happen in an iphone since the 3G connection is never really lost).
- Transport A is saved and then transport B is saved in its stead
- 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
- 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.
Note: See
TracTickets for help on using
tickets.