LanScape VOIP Media Engine
MakeCallUri
The MakeCallUri
procedure is called by application software to initiate an outbound phone
call using a SIP URI. It is similar in functionality to the MakeCall API procedure.
TELEPHONY_RETURN_VALUE MakeCallUri(
SIPHANDLE hStateMachine,
char *pSipUri,
BOOL UseProxy,
int PhoneLine,
BOOL Synchronous,
DWORD TimeOutMs
);
Parameters:
hStateMachine
[in] The handle to the telephony engine. This is the handle that was returned by a previous call to the StartSipTelephony procedure.
pSipUri
[in] The NULL terminated string containing the SIP URI. This is the destination to call. The basic form of an acceptable SIP URI is sip:user@host:port. At this time the media engine only processes user, host and port of SIP URIs. For a complete description of SIP URIs, please see section 19.1.1 (SIP and SIPS URI Components) of the SIP RFC (RFC3261).
UseSipProxy
[in] If specified as non zero, then the call will be sent through your configured proxy server regardless of the destination address specified in the pSipUri parameter. The proxy will then be responsible for forwarding the call to the proper destination.
PhoneLine
[in] The zero based phone line to access.
Synchronous
[in] If this parameter is non zero (TRUE), the procedure will not return until: the call is terminated or an error has been detected. If this parameter is zero (FALSE), then this procedure will return immediately with the return value of SipSuccess. The call’s termination progress and state changes should be monitored by application software using the event notification callback mechanism.
TimeOutMs
[in] If the phone call is being made synchronously, then this parameter specifies the maximum timeout in milliseconds the procedure will wait for the call to go active (answered by the far end).
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. The MakeCallUri API procedure returns the same values as specified by the MakeCall API procedure in addition to the following return values:
Value |
Description |
SipProxyNotEnabled
|
The call was being made and the UseProxy parameter was set to a non zero value. However, sip proxy support has not been enabled and the phone call can not be completed.
|
SipBadSipUri |
A bad Sip URI string was specified. |