The ReStartSipTelephony function allows you to stop and then restart the telephony engine using a single API procedure. It is added to the API to simplify operations. You would typically use this procedure to halt a currently running telephony engine and restart a new instance (possibly using a different SIP port and/or and RTP port ranges.
Caution:
IMPORTANT:

Do not attempt to call any other media engine API procedure in another thread while calling this procedure. If you do, you run the risk of corrupting application heap memory.

Namespace:  LanScape
Assembly:  LMEVoipManaged (in LMEVoipManaged.dll) Version: 6.0.5226.26700

Syntax

C#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE ReStartSipTelephony(
	VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS StartupParams
)
Visual Basic (Declaration)
Public Function ReStartSipTelephony ( _
	StartupParams As VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS _
) As VoipMediaEngine..::.TELEPHONY_RETURN_VALUE
Visual C++
public:
VoipMediaEngine..::.TELEPHONY_RETURN_VALUE ReStartSipTelephony(
	VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS^ StartupParams
)
J#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE ReStartSipTelephony(
	VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS StartupParams
)

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 ValueDescription
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)

SipMediaEngineNotInitialized
Your application software attempted a telephony engine operation before calling the InitializeMediaEngine(String, UInt32) API procedure. Before attempting any API operations, you must initialize the telephony engine by calling the InitializeMediaEngine(String, UInt32) API procedure.

(API return value)

SipBadParameter
One of the telephony API procedures was called by application software and was passed a pointer to an invalid memory address. Normally this error will occur when application software passes NULL pointer values to the telephony API. For managed code applications, you should never see this error unless your process space has exhausted memory.

(API return value)

SipThreadCreationError
The telephony engine attempted to create an internal thread object. The thread creation failed. Make sure your system has enough free resources (memory) to perform the operations you are requesting from the telephony engine. Thread creation errors are generally associated with the application process space consuming too much system memory. To resolve this error, you may want to consider disabling certain features of the media engine such as conference calling. You can also reduce memory requirements if you reduce the maximum signal length of internal media engine signal paths by specifying a smaller number for the MaxMixerLinebuffers member of the VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS structure that is passed to the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) and ReStartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedures. Reducing the default stack size for threads in your application may also allow your process space to consume less system memory.

(API return value, PHONE_LINE_NOTIFICATION)

SipBandwidthError
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. You specified an invalid sample rate value for the AudioRecordBandWidth and/or the AudioPlaybackBandWidth members of the VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS class.

(API return value)

SipBadNumberOfPhoneLines
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. When you called the API procedure, you specified an invalid number of phone lines the telephony engine was supposed to create. You will get this error if you request the creation of phone lines that exceed the maximum number of phone lines you are licensed to use.

(API return value)

SipInvalidInstance
This error informs an application that is has exceeded the number of telephony engine instances allowed. The total number of telephony engine instances your application can create is determined by the licensing capabilities you have purchased.

(API return value)

SipMemoryError
The telephony engine attempted to allocate system memory but the allocation failed. Make sure the host system has enough virtual memory. Increasing the amount of virtual memory can remove these errors, however if critical telephony engine code has been swapped out to disk and is not resident in physical memory, you may experience degraded audio/video performance. If you want to remove this error and obtain the best possible audio/video performance, make sure the host system has enough physical memory. To resolve this error, you may also want to consider disabling certain features of the media engine such as conference calling. You can also reduce memory requirements if you reduce the maximum signal length of internal media engine signal paths by specifying a smaller number for the MaxMixerLinebuffers member of the VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS class that is passed to the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) and ReStartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedures.

(API return value, PHONE_LINE_NOTIFICATION)

SipNetworkInitializeError
Indicates a critical internal network initialization error within the telephony engine. User application software should not continue if this error is detected. Make sure the host machine is configured properly and is adequate for the intended application. For host systems running Microsoft Windows operating systems, you must have Windows socket 2 support properly installed. Close all other unnecessary network applications to reduce the loading on the host machine's network layer.

(API return value)

SipStartRtpPortError
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. You specified an invalid starting RTP port number. To remove this error, specify a starting RTP port number that is an even integer. Odd ports are assigned to RTCP.

(API return value)

SipRtpAndSipPortOverlapError
This error applies to telephony engines that are licensed to create more that one telephony engine instance. Your application attempted to create another instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. This secondary instance detected that there is a port assignment overlap for either the internal SIP stack or the RTP stack with an earlier instance another telephony engine. If you are instantiating more than one instance of the telephony engine, SIP and RTP ports across all telephony engines must be unique.

(API return value)

SipEventError
This error occurs when an instance of the telephony engine is being created. It indicates that the operating system refused to created an event required by the SIP stack. Make sure the host system you are using has enough free resources and memory to support telephony operations.

(API return value)

SipAudioOutFailure
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. When you called the API procedure, you specified that the telephony engine manage a host multimedia device for audio output. When the telephony engine was being initialized, the audio output device could not be opened. To remove this error, make sure the audio output device is not already being used by another application. Also, make sure your audio output device supports 22kHz PCM sampled data.

(API return value)

SipAudioInFailure
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. When you called the API procedure, you specified that the telephony engine manage a host multimedia device for audio input. When the telephony engine was being initialized, the audio input device could not be opened. To remove this error, make sure the audio input device is not already being used by another application. Also, make sure your audio input device supports 22kHz PCM sampled data.

(API return value)

SipRtpReceiverEventError
This error occurs when an instance of the telephony engine is being created. It indicates that the operating system refused to created an event required by the RTP stack. Make sure the host system you are using has enough free resources to support telephony operations.

(API return value)

SipRtpReceiverThreadStartFailure
The telephony engine attempted to create an internal thread object. The thread creation failed. Make sure your system has enough free resources to perform the operations you are requesting from the telephony engine.

(API return value)

SipPlaybackMixerThreadStartError
The telephony engine attempted to create an internal thread object. The thread creation failed. Make sure your system has enough free resources to perform the operations you are requesting from the telephony engine.

(API return value)

SipSocketOpenError
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. The telephony engine experienced an error while creating a socket resource for the internal SIP stack.

(API return value)

SipSocketBindError
This error informs application software that the internal SIP stack detected an error while attempting a bind operation on an open network socket. This error indicates that the port the SIP stack is attempting to use is already in use or the IP address the telephony engine is using is invalid on the host machine. If you receive this error, make sure no other application is attempting to use the SIP port you specified when starting an instance of the telephony engine. Also make sure that the IP address the telephony engine is using is actually assigned to the host machine.

(API return value)

SipBadPhoneName
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. When you called the API procedure, you specified an invalid pointer to the name of the phone. For further information, see the VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS class.

(API return value)

SipBadDisplayName
Your application attempted to create an instance of the telephony engine using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) API procedure. When you called the API procedure, you specified an invalid pointer to the display name of the phone. For further information, see the VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS class.

(API return value)

SipUdpRxBufferSizeError
This error occurs when an instance of the telephony engine is being created. It indicates that the media engine could not resize the SIP receive network buffer to the specified number of bytes. You may have to specify a smaller buffer size.

(API return value)

SipUdpTxBufferSizeError
This error occurs when an instance of the telephony engine is being created. It indicates that the media engine could not resize the SIP transmit network buffer to the specified number of bytes. You may have to specify a smaller buffer size.

(API return value)

Remarks

None.

See Also