LanScape VOIP Media Engine
ASSIGN_INCOMING_PHONE_LINE
The ASSIGN_INCOMING_PHONE_LINE
structure is sent to an application when the media engine receives
an incoming call. The media engine uses it to convey information to the
application regarding the incoming call and to allow the application a
chance to determine what available input phone line the call will be assigned
to. Also, the application can set a member variable of this structure
to allow the media engine to immediately terminate the incoming call.
Application software can access the information in this structure when
it processes the SipIncomingCallAssignPhoneLine
event.
typedef struct
{
char *pReceivedSipInvite;
// Source information
//
char *pFromHeader;
char *pSrcUrl;
char *pSrcDisplayName;
char *pSrcUserName;
char *pSrcContactUserName;
char *pSrcHost;
DWORD SrcPort;
char *pReceivedIpAddress;
DWORD ReceivedPort;
// Destination information
//
char *pToHeader;
char *pDestUrl;
char *pDestUserName;
char *pDestHost;
char *pCallId;
// Other information
//
char *pOriginatingEngineId;
// data returned to the media engine.
//
int AssignedPhoneLine;
BOOL TerminateIncomingCall;
int SipResponseCode;
}ASSIGN_INCOMING_PHONE_LINE;
Members:
pReceivedSipInvite
This is a pointer to a NULL terminated string that contains the received SIP INVITE message for the inbound call.
pFromHeader
This character array allows application software to access the SIP "From:" header that is contained in received INVITE messages.
pSrcUrl
This character array contains the SIP URL of the person calling us. Please refer to the installed SIP RFCs for a description of the format of SIP URLs (RFC 3261). The information contained in this URL is equivalent to the information that is present in the received INVITE message "From:" header.
pSrcDisplayName
The display name of the source of the phone call. This string may be empty if the far end that is initiating the call does not have a display name assigned.
pSrcUserName
The name of the IP phone/device that initiated this call. This is the same as the user name specified in the SIP "From:" header.
pSrcContactUserName
The name of the IP phone/device that initiated this call. This is the same as the user name specified in the SIP "Contact:" header.
pSrcHost
The host name of the IP phone/device that initiated this call.
SrcPort
The sending port of the IP phone/device that initiated this call.
pReceivedIpAddress
The detected IP address the far end used to originate the phone call.
ReceivedPort
The detected port the far end used to originate the phone call.
pToHeader
This character array allows application software to access the SIP "To:" header that is contained in received INVITE messages.
pDestUrl
This character array contains the SIP URL for the destination of the phone call. If you are developing a PSTN gateway, you will use this member to get the PSTN phone number. Most applications can ignore this member. Please refer to the installed SIP RFCs for a description of the format of SIP URLs (RFC 3261).
pDestUserName
The destination user name of the phone call.
pDestHost
The host name of the call destination.
pCallId
The call ID for the call.
pOriginatingEngineId
If the originator of the phone call is
another LanScape VOIP Media Engine, this is the unique ID of that media
engine. Application software can ignore this ID value.
AssignedPhoneLine
This value is set to -1 by default by the media engine. Application software
can set this value to a zero based phone line index that represents the
phone line that should be used to answer the incoming phone call. If application
software does not want to tell the media engine what phone line to assign
the incoming call to, then this value should not be modified.
TerminateIncomingCall
Application software can set this value
to a non zero value to allow the VOIP Media Engine to terminate the incoming
call immediately. If your application wants the VOIP Media Engine to process
the received call as normal, it should set this value to zero (FALSE).
SipResponseCode
This is the SIP response code you want your application to return to the far end of the incoming call. Used only when terminating the call. Any one of the following values can be specified:
400 - "Invalid Request"
402 - "Payment Required"
403 - "Forbidden"
404 - "Not Found"
405 - "Method Not Allowed"
406 - "Not Acceptable"
409 - "Conflict"
410 - "Gone"
420 - "Bad Extension"
480 - "Temporarily Unavailable"
481 - "Transaction Does Not Exist"
485 - "Ambiguous"
486 - "Busy Here"
488 - "Not Acceptable Here"
493 - "Undecipherable"
If
you specify any other 4xx value that is not described above, the VOIP
Media Engine will ignore your value and return 480 to the far end of the
call.