SIP session "Keep-alive":
If your application communicates with a proxy and registrar, LanScape recommends that you use the
SendSipKeepAlive(String, UInt32, Boolean, Int32) functionality of the media engine to send "NULL" SIP messages to
your server. If you cannot use the SendSipKeepAlive(String, UInt32, Boolean, Int32) API procedure, then you can use
REGISTER messages for SIP session "Keep-alive". See the EnableSipRegisterServer(String, Boolean, Boolean, String, UInt32, UInt32, UInt32, UInt32, Boolean)
API procedure for further details.
If your application does not communicate with a proxy server and is situated behind NAT network elements, this alternate form of SIP "Keep-alive" may be of some use to you. This form of SIP "Keep-alive" is only useful if your application is communicating with anther SIP device located in the global network space (the internet) or is behind its own NAT that has been configured to allow port forwarding. When you call these types of far end SIP endpoints and you are behind NAT, the far end will not be able to communicate with your application unless your application keeps the network session open in your NAT device. You can keep a session open in your NAT device during a call if you enable SIP "Keep-alive" using this API procedure.
If you need to support the network environment described above, then you must enable SIP "Keep-alive" transmissions using this API procedure. Keep in mind that the "Keep-alive" SIP messages that are transmitted to the far end device only occur when a call is active. The media engine uses SIP OPTIONS messages for all "Keep-alive" network traffic.
RTP session "Keep-alive":
When RTP "Keep-alive" is enabled, the media engine makes sure that some voice data is transmitted during the
specified interval. If no voice data is being generated by your application, a small amount of silence voice
data will be transmitted. You might have to enable RTP session "Keep-alive" if you have enabled the noise
discrimination (noise gate) capability of the media engine and you are having your RTP media proxied by a
media proxy or boundary controller.
Assembly: LMEVoipManaged (in LMEVoipManaged.dll) Version: 6.0.5226.26700
Syntax
C# |
---|
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE EnableKeepAliveTransmissions( bool KeepAliveSip, bool KeepAliveRtp, uint NatSessionTimeMs ) |
Visual Basic (Declaration) |
---|
Public Function EnableKeepAliveTransmissions ( _ KeepAliveSip As Boolean, _ KeepAliveRtp As Boolean, _ NatSessionTimeMs As UInteger _ ) As VoipMediaEngine..::.TELEPHONY_RETURN_VALUE |
Visual C++ |
---|
public: VoipMediaEngine..::.TELEPHONY_RETURN_VALUE EnableKeepAliveTransmissions( bool KeepAliveSip, bool KeepAliveRtp, unsigned int NatSessionTimeMs ) |
J# |
---|
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE EnableKeepAliveTransmissions( boolean KeepAliveSip, boolean KeepAliveRtp, UInt32 NatSessionTimeMs ) |
Parameters
- KeepAliveSip
- Type: System..::.Boolean
If set to a non zero value, SIP "Keep-alive" will be enabled.
- KeepAliveRtp
- Type: System..::.Boolean
If set to a non zero value, RTP "Keep-alive" will be enabled.
- NatSessionTimeMs
- Type: System..::.UInt32
Allows application software to specify the shortest NAT session time that must be supported. Generally this value can be set between 10000 to 30000 milliseconds (10 to 30 seconds).
Return Value
If the function succeeds, the return value will be SipSuccess.
If the function fails, the return value will be one of the following values as specified by the VoipMediaEngine..::.TELEPHONY_RETURN_VALUE data type.
Return Value | Description |
---|---|
SipCallFailure |
This value is returned by telephony API procedures to indicate general API failure. This error value is used as a "catch all error". If you receive this error, check to make sure that all parameters specified in the API procedure call are correct. Particularly, verify that pointers to memory regions are valid. This error return value is only used if a mapping to another specific error value does not exist.
(API return value) |
SipInvalidHandle |
Application software specified an invalid telephony handle in one of the API procedures.
This usually indicates memory corruption on the part of application software.
(API return value) |