| 4 | |
| 5 | === Activating/deactivating stream keep-alive mechanism in run-time === |
| 6 | - Make sure that stream keep-alive mechanism is enabled: |
| 7 | - define PJMEDIA_STREAM_ENABLE_KA to PJMEDIA_STREAM_KA_EMPTY_RTP or PJMEDIA_STREAM_KA_USER in config_site.h |
| 8 | - optionally, update default keep-alive settings (user packet content and interval) via compile-time macros PJMEDIA_STREAM_KA_USER_PKT and PJMEDIA_STREAM_KA_INTERVAL. |
| 9 | - If you are using PJSUA, configure this via account config: |
| 10 | - set {{{pjsua_acc_config.use_stream_ka}}} |
| 11 | - use the account config for adding ({{{pjsua_acc_add()}}}) or modifying ({{{pjsua_acc_modify()}}}) account, so all media streams for that account will use this setting. |
| 12 | - If you are using PJMEDIA level, set stream info {{{pjmedia_stream_info.use_ka}}} and use the stream info for creating stream ({{{pjmedia_stream_create()}}}). |