Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#883 closed enhancement (fixed)

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:
Backport to 1.x milestone: Backported:


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 (4)

comment:1 Changed 15 years ago by nanang

In r2759: done.

comment:2 Changed 15 years 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.

comment:3 Changed 15 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 14 years ago by bennylp

Updated by ticket #1094

Note: See TracTickets for help on using tickets.