Ticket #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: |
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.
![(please configure the [header_logo] section in trac.ini)](/repos/chrome/site/pj.jpg)