Ticket #883 (closed enhancement: fixed)

Opened 15 months ago

Last modified 2 months ago

Add user defined NAT hole-punching and keep-alive mechanism to media stream

Reported by: nanang Owned by: nanang
Priority: normal Milestone: release-1.3
Component: pjmedia Version: trunk
Keywords: Cc:

Description

The stream already has NAT hole-punching and keep-alive mechanism, by initially disabling VAD for PJMEDIA_STREAM_VAD_SUSPEND_MSEC (600) milliseconds (to punch a hole in NAT), and to let an outgoing RTP packet go when silence period is greater than PJMEDIA_CODEC_MAX_SILENCE_PERIOD (5 seconds) to keep the NAT binding open.

However some types of application may not be able to use this mechanism, for example a Push to Talk over Cellular (PoC), since transmitting RTP packet without being granted talk permission would upset the server.

Another keep-alive mechanism is needed, whereby the stream should transmit an empty RTP packet or even a non-RTP packet.

When this alternative keep-alive mechanism is used, application may disable the existing keep-alive mechanism by setting PJMEDIA_STREAM_VAD_SUSPEND_MSEC to zero and PJMEDIA_CODEC_MAX_SILENCE_PERIOD to -1.

Change History

Changed 15 months ago by nanang

In r2759: done.

Changed 15 months ago by nanang

In r2761:

  • Fixed stream bug in generating RTP header for keep-alive packet with empty RTP.
  • Updated stream to skip suspending the VAD when PJMEDIA_STREAM_VAD_SUSPEND_MSEC is set to 0.

Changed 15 months ago by nanang

  • status changed from new to closed
  • resolution set to fixed

Changed 2 months ago by bennylp

Updated by ticket #1094

Note: See TracTickets for help on using tickets.