Opened 16 years ago

Last modified 12 years ago

#539 closed enhancement

Create media transport dynamically in PJSUA-LIB — at Initial Version

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

Description

Currently all media transports are pre-created in PJSUA-LIB according to the number of maximum calls to be supported. This decision was made to speed up call setup time and to simplify call state logic.

But there are few drawbacks with this approach:

  1. it requires STUN and TURN transport to be kept-alive, which means it needs to send periodic keep-alive packets, and this is not good for battery consumption in mobile devices.
  2. it requires TURN long-term allocation, which will fail if the NAT/mapped public IP address mapping has changed.
  3. even when TURN is not used it may still fail when normal UDP media transport (i.e. not ICE) is used and the IP address (STUN or not) changes.
  4. it allocates a lot of resources when the number of max_calls is large.

Because of these drawbacks, it's better to create the media transport on demand when a call is set up. To speed up call setup, we may employ caching mechanism where a transport is kept-alive for few seconds and may be reused for subsequent calls. And for flexibility, add a new callback to enable application to create a custom transport for a particular call.

Change History (0)

Note: See TracTickets for help on using tickets.