The SetPhoneName function allows you to change the name of any phone line of the telephony engine. By default, the name of each phone line is set when you call the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) procedure. For most applications, phone line names never need to be changed. There are application instances however that required that for a "specific call", the name of the phone line be changed.

The name you assign to phone lines of the telephony engine can contain any alphanumeric characters, (a-z, A-z or 0-9), and any of the following characters: dash (-), underscore (_), period (.), exclamation point (!), tilde (~) or asterisk (*). Also, the phone name must not contain any "white space" characters.

Each instance of the telephony engine is considered a single phone set each with individually named lines. The SIP protocol uses this name when calling other IP phones. The SIP endpoint on the far end of a call normally displays this name to the user when detecting an incoming call.

Note:
The name specified using the StartSipTelephony(VoipMediaEngine..::.START_SIP_TELEPHONY_PARAMS) procedure is the name that is used if you allow the telephony engine to register with a SIP registrar server. In the case of a SIP registrar server, this is the name of your telephony engine in the domain of the SIP proxy or registrar server.

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

Syntax

C#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetPhoneName(
	int PhoneLine,
	string PhoneName
)
Visual Basic (Declaration)
Public Function SetPhoneName ( _
	PhoneLine As Integer, _
	PhoneName As String _
) As VoipMediaEngine..::.TELEPHONY_RETURN_VALUE
Visual C++
public:
VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetPhoneName(
	int PhoneLine, 
	String^ PhoneName
)
J#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetPhoneName(
	int PhoneLine,
	String PhoneName
)

Parameters

PhoneLine
Type: System..::.Int32
The zero based phone line to configure.
PhoneName
Type: System..::.String
The null terminate string containing the name of the telephony engine phone line.

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)

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)

Remarks

None.

See Also