LanScape VOIP Media Engine
SetWanIpAddress
The SetWanIpAddress function allows an application to specify a wide area network address (WAN) that will be used when communicating with other devices. Depending on your network infrastructure, this API procedure may have to be called by an application if the application resides on a private network and is behind one or more NAT routers and you intend to allow calls to be made to the global internet.
If your application has knowledge about its network infrastructure (NAT router placement and subnet configurations) this API procedure can be called prior to placing a phone call to ensure that the far end of the call will be able to communicate back to your application. If you are also deploying a LanScape proxy/registrar with your voice solution, you do not need to call this procedure.
If your application changes the Wan IP address
of the media engine, your application will also receive the SipWanIpAddressChange event.
TELEPHONY_RETURN_VALUE SetWanIpAddress(
SIPHANDLE hStateMachine,
char *pIpAddressStr
);
Parameters:
hStateMachine
[in] The handle to the telephony engine. This is the handle that was returned by a previous call to the StartSipTelephony procedure.
pIpAddressStr
[in] The address of a string that specifies a dotted decimal IP address (i.e. “64.25.212.90”). If your application wants to disable the use of a previously configured Wan IP address, specify the address of a zero length string ("").
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 TELEPHONY_RETURN_VALUE data type.
Value |
Description |
SipInvalidHandle |
An API procedure was passed an invalid handle. The telephony engine attempts to verify user specified telephony handles and returns this error when an invalid handle is detected.
|
SipBadParameter |
For API procedures that receive pointers from
user software, this error indicates that a NULL pointer condition was
detected. Make sure all pointers your software passes to the telephony
API are valid. |