Objective Systems, Inc.  

Q.931/H.2250 Message Handling


Data Structures

struct  Q931InformationElement
struct  Q931Message
 Q.931 message structure. More...
struct  OOAliases
 This structure is used to hold an H.323 alias address. More...
struct  OOH225MsgCallbacks
 This structure holds the various callback functions that are triggered when H.225 messages are received or constructed. More...

Defines

#define OO_MAX_NUMBER_LENGTH   50
#define OO_MAX_CALL_TOKEN   9999
#define Q931_E_TOOSHORT   (-1001)
#define Q931_E_INVCALLREF   (-1002)
#define Q931_E_INVLENGTH   (-1003)
#define ooAliases   OOAliases

Typedefs

typedef int(*) cb_OnReceivedSetup (struct OOH323CallData *call, struct Q931Message *pmsg)
 This callback is triggered when an H.225 SETUP message is received by the application.
typedef int(*) cb_OnReceivedConnect (struct OOH323CallData *call, struct Q931Message *pmsg)
 This callback is triggered when an H.225 CONNECT message is received by the application.
typedef int(*) cb_OnBuiltSetup (struct OOH323CallData *call, struct Q931Message *pmsg)
 This callback is triggered after an H.225 SETUP message has been constructed and is ready to be sent out.
typedef int(*) cb_OnBuiltConnect (struct OOH323CallData *call, struct Q931Message *pmsg)
 This callback is triggered after an H.225 CONNECT message has been constructed and is ready to be sent out.

Enumerations

enum  Q931MsgTypes {
  Q931NationalEscapeMsg = 0x00,
  Q931AlertingMsg = 0x01,
  Q931CallProceedingMsg = 0x02,
  Q931ConnectMsg = 0x07,
  Q931ConnectAckMsg = 0x0f,
  Q931ProgressMsg = 0x03,
  Q931SetupMsg = 0x05,
  Q931SetupAckMsg = 0x0d,
  Q931ResumeMsg = 0x26,
  Q931ResumeAckMsg = 0x2e,
  Q931ResumeRejectMsg = 0x22,
  Q931SuspendMsg = 0x25,
  Q931SuspendAckMsg = 0x2d,
  Q931SuspendRejectMsg = 0x21,
  Q931UserInformationMsg = 0x20,
  Q931DisconnectMsg = 0x45,
  Q931ReleaseMsg = 0x4d,
  Q931ReleaseCompleteMsg = 0x5a,
  Q931RestartMsg = 0x46,
  Q931RestartAckMsg = 0x4e,
  Q931SegmentMsg = 0x60,
  Q931CongestionCtrlMsg = 0x79,
  Q931InformationMsg = 0x7b,
  Q931NotifyMsg = 0x6e,
  Q931StatusMsg = 0x7d,
  Q931StatusEnquiryMsg = 0x75,
  Q931FacilityMsg = 0x62
}
enum  Q931IECodes {
  Q931BearerCapabilityIE = 0x04,
  Q931CauseIE = 0x08,
  Q931FacilityIE = 0x1c,
  Q931ProgressIndicatorIE = 0x1e,
  Q931CallStateIE = 0x14,
  Q931DisplayIE = 0x28,
  Q931SignalIE = 0x34,
  Q931CallingPartyNumberIE = 0x6c,
  Q931CalledPartyNumberIE = 0x70,
  Q931RedirectingNumberIE = 0x74,
  Q931UserUserIE = 0x7e,
  Q931KeypadIE = 0x2c
}
enum  Q931InformationTransferCapability {
  Q931TransferSpeech,
  Q931TransferUnrestrictedDigital = 8,
  Q931TransferRestrictedDigital = 9,
  Q931Transfer3_1kHzAudio = 16,
  Q931TrasnferUnrestrictedDigitalWithTones = 17,
  Q931TransferVideo = 24
}
enum  Q931CauseValues {
  Q931UnallocatedNumber = 0x01,
  Q931NoRouteToNetwork = 0x02,
  Q931NoRouteToDestination = 0x03,
  Q931ChannelUnacceptable = 0x06,
  Q931NormalCallClearing = 0x10,
  Q931UserBusy = 0x11,
  Q931NoResponse = 0x12,
  Q931NoAnswer = 0x13,
  Q931SubscriberAbsent = 0x14,
  Q931CallRejected = 0x15,
  Q931NumberChanged = 0x16,
  Q931Redirection = 0x17,
  Q931DestinationOutOfOrder = 0x1b,
  Q931InvalidNumberFormat = 0x1c,
  Q931NormalUnspecified = 0x1f,
  Q931StatusEnquiryResponse = 0x1e,
  Q931NoCircuitChannelAvailable = 0x22,
  Q931NetworkOutOfOrder = 0x26,
  Q931TemporaryFailure = 0x29,
  Q931Congestion = 0x2a,
  Q931RequestedCircuitUnAvailable = 0x2c,
  Q931ResourcesUnavailable = 0x2f,
  Q931IncompatibleDestination = 0x58,
  Q931ProtocolErrorUnspecified = 0x6f,
  Q931RecoveryOnTimerExpiry = 0x66,
  Q931InvalidCallReference = 0x51,
  Q931ErrorInCauseIE = 0
}
enum  Q931SignalInfo {
  Q931SignalDialToneOn,
  Q931SignalRingBackToneOn,
  Q931SignalInterceptToneOn,
  Q931SignalNetworkCongestionToneOn,
  Q931SignalBusyToneOn,
  Q931SignalConfirmToneOn,
  Q931SignalAnswerToneOn,
  Q931SignalCallWaitingTone,
  Q931SignalOffhookWarningTone,
  Q931SignalPreemptionToneOn,
  Q931SignalTonesOff = 0x3f,
  Q931SignalAlertingPattern0 = 0x40,
  Q931SignalAlertingPattern1,
  Q931SignalAlertingPattern2,
  Q931SignalAlertingPattern3,
  Q931SignalAlertingPattern4,
  Q931SignalAlertingPattern5,
  Q931SignalAlertingPattern6,
  Q931SignalAlertingPattern7,
  Q931SignalAlretingOff = 0x4f,
  Q931SignalErrorInIE = 0x100
}
enum  Q931NumberingPlanCodes {
  Q931UnknownPlan = 0x00,
  Q931ISDNPlan = 0x01,
  Q931DataPlan = 0x03,
  Q931TelexPlan = 0x04,
  Q931NationalStandardPlan = 0x08,
  Q931PrivatePlan = 0x09,
  Q931ReservedPlan = 0x0f
}
enum  Q931TypeOfNumberCodes {
  Q931UnknownType = 0x00,
  Q931InternationalType = 0x01,
  Q931NationalType = 0x02,
  Q931NetworkSpecificType = 0x03,
  Q931SubscriberType = 0x04,
  Q931AbbreviatedType = 0x06,
  Q931ReservedType = 0x07
}
enum  Q931CodingStandard {
  Q931CCITTStd = 0,
  Q931ReservedInternationalStd,
  Q931NationalStd,
  Q931NetworkStd
}
enum  Q931TransferMode {
  Q931TransferCircuitMode = 0,
  Q931TransferPacketMode = 2
}
enum  Q931TransferRate {
  Q931TransferRatePacketMode = 0x00,
  Q931TransferRate64Kbps = 0x10,
  Q931TransferRate128kbps = 0x11,
  Q931TransferRate384kbps = 0x13,
  Q931TransferRate1536kbps = 0x15,
  Q931TransferRate1920kbps = 0x17
}
enum  Q931UserInfoLayer1Protocol {
  Q931UserInfoLayer1CCITTStdRate = 1,
  Q931UserInfoLayer1G711ULaw,
  Q931UserInfoLayer1G711ALaw,
  Q931UserInfoLayer1G721ADPCM,
  Q931UserInfoLayer1G722G725,
  Q931UserInfoLayer1H261,
  Q931UserInfoLayer1NonCCITTStdRate,
  Q931UserInfoLayer1CCITTStdRateV120,
  Q931UserInfoLayer1X31
}

Functions

EXTERN int ooOnReceivedSetup (struct OOH323CallData *call, Q931Message *q931Msg)
 This function is used to process a received SETUP message.
EXTERN int ooOnReceivedSignalConnect (struct OOH323CallData *call, Q931Message *q931Msg)
 This function is used to process a received CONNECT message.
EXTERN int ooHandleH2250Message (struct OOH323CallData *call, Q931Message *q931Msg)
 This function is used to handle received H.2250 messages.
EXTERN int ooOnReceivedFacility (struct OOH323CallData *call, Q931Message *pQ931Msg)
 This function is used to process a received Facility message.
EXTERN int ooHandleTunneledH245Messages (struct OOH323CallData *call, H225H323_UU_PDU *pH323UUPdu)
 This function is used to process tunneled H245 messages.
EXTERN int ooHandleStartH245FacilityMessage (struct OOH323CallData *call, H225Facility_UUIE *facility)
 This is a helper function used to handle an startH245 Facility message.
EXTERN int ooH323RetrieveAliases (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses, OOAliases **aliasList)
 This function is used to retrieve the aliases from Sequence of alias addresses.
EXTERN int ooPopulateAliasList (OOCTXT *pctxt, OOAliases *pAliases, H225_SeqOfH225AliasAddress *pAliasList)
 This is a helper function used to populate alias list using aliases.
EXTERN OOAliasesooH323GetAliasFromList (OOAliases *aliasList, int type, char *value)
 This function is used to search a particular alias in the alias list.
EXTERN OOAliasesooH323AddAliasToList (OOAliases **pAliasList, OOCTXT *pctxt, H225AliasAddress *pAliasAddress)
 This function is used to add a new alias to alias list.
int ooH323GetIpPortFromH225TransportAddress (struct OOH323CallData *call, H225TransportAddress *h225Address, char *ip, int *port)
 This function is used to retrieve ip address and port number from an H225TransportAddress structure.
EXTERN int ooQ931Decode (struct OOH323CallData *call, Q931Message *msg, int length, ASN1OCTET *data)
 This function is invoked to decode a Q931 message.
EXTERN int ooDecodeUUIE (Q931Message *q931Msg)
 This function is used to decode the UUIE of the message from the list of ies.
EXTERN int ooEncodeUUIE (Q931Message *q931msg)
 This function is used to encode the UUIE field of the Q931 message.
EXTERN Q931InformationElementooQ931GetIE (const Q931Message *q931msg, int ieCode)
 This function is invoked to retrieve an IE element from a Q931 message.
EXTERN void ooQ931Print (const Q931Message *q931msg)
 This function is invoked to print a Q931 message.
EXTERN int ooCreateQ931Message (Q931Message **msg, int msgType)
 This function is invoked to create an outgoing Q931 message.
EXTERN ASN1USINT ooGenerateCallReference (void)
 This function is invoked to generate a unique call reference number.
EXTERN int ooGenerateCallIdentifier (H225CallIdentifier *callid)
 This function is used to generate a unique call identifier for the call.
EXTERN int ooFreeQ931Message (Q931Message *q931Msg)
 This function is invoked to release the memory used up by a Q931 message.
EXTERN int ooGetOutgoingQ931Msgbuf (struct OOH323CallData *call, ASN1OCTET *msgbuf, int *len, int *msgType)
 This function is invoked to retrive the outgoing message buffer for Q931 message.
EXTERN int ooSendReleaseComplete (struct OOH323CallData *call)
 This function is invoked to send a ReleaseComplete message for the currently active call.
EXTERN int ooSendCallProceeding (struct OOH323CallData *call)
 This function is invoked to send a call proceeding message in response to received setup message.
EXTERN int ooSendAlerting (struct OOH323CallData *call)
 This function is invoked to send alerting message in response to received setup message.
EXTERN int ooSendFacility (struct OOH323CallData *call)
 This function is invoked to send Facility message.
EXTERN int ooQ931SendDTMFAsKeyPadIE (struct OOH323CallData *call, const char *data)
 This function is used to send dtmf data as Q931 keypad information element as part of information message.
EXTERN int ooSendConnect (struct OOH323CallData *call)
 This function is invoked to send a Connect message in response to received setup message.
EXTERN int ooH323MakeCall (char *dest, char *callToken, ooCallOptions *opts)
 This function is used to send a SETUP message for outgoing call.
int ooH323CallAdmitted (struct OOH323CallData *call)
 Helper function used to make a call once it is approved by the Gk.
EXTERN int ooH323HandleCallFwdRequest (struct OOH323CallData *call)
 This function is used to handle a call forward request sent to local endpoint by remote endpoint.
EXTERN int ooH323ForwardCall (char *callToken, char *dest)
 This function is used for forwarding/redirecting a call to third party.
EXTERN int ooH323HangCall (char *callToken, OOCallClearReason reason)
 This function is used to hangup a currently active call.
EXTERN int ooAcceptCall (struct OOH323CallData *call)
 Function to accept a call by sending connect.
EXTERN int ooH323MakeCall_helper (struct OOH323CallData *call)
int ooParseDestination (struct OOH323CallData *call, char *dest, char *parsedIP, unsigned len, OOAliases **aliasList)
 This function is used to parse the destination.
int ooGenerateCallToken (char *callToken, size_t size)
 This function is used to generate a new call token.
EXTERN int ooSendAsTunneledMessage (struct OOH323CallData *call, ASN1OCTET *msgbuf, int h245Len, int h245MsgType, int associatedChan)
 This function sends an encoded H.245 message buffer as a tunneled H.245 Facility message.
int ooEncodeH225Message (struct OOH323CallData *call, Q931Message *pq931Msg, ASN1OCTET *msgbuf, size_t size)
 This function is used to encode an H.225 message.
int ooCallEstbTimerExpired (void *data)
 This is a callback function which is called when there is no CONNECT response from the remote endpoint after the SETUP has been sent and timeout period has passed.
EXTERN int ooQ931SetKeypadIE (Q931Message *pmsg, const char *data)
 This function is used to add a keypad IE to a Q931 message for sending dtmf.
EXTERN int ooSetBearerCapabilityIE (Q931Message *pmsg, enum Q931CodingStandard codingStandard, enum Q931InformationTransferCapability capability, enum Q931TransferMode transferMode, enum Q931TransferRate transferRate, enum Q931UserInfoLayer1Protocol userInfoLayer1)
 This function is used to add a bearer capability IE to a Q931 message.
EXTERN int ooQ931SetCalledPartyNumberIE (Q931Message *pmsg, const char *number, unsigned plan, unsigned type)
 This function is used to add a called party number ie to a q931 message.
EXTERN int ooQ931SetCallingPartyNumberIE (Q931Message *pmsg, const char *number, unsigned plan, unsigned type, unsigned presentation, unsigned screening)
 This function is used to add a CallingPartyNumber ie to a q931 message.
EXTERN int ooQ931SetCauseIE (Q931Message *pmsg, enum Q931CauseValues cause, unsigned coding, unsigned location)
 This function is used to set a cause ie for a q931 message.
EXTERN int ooQ931GetCauseAndReasonCodeFromCallClearReason (OOCallClearReason clearReason, enum Q931CauseValues *cause, unsigned *reasonCode)
 This function is used to convert a call clear reason to cause and reason code.
EXTERN OOCallClearReason ooGetCallClearReasonFromCauseAndReasonCode (enum Q931CauseValues cause, unsigned reasonCode)
 This function is used to convert a cause value and reason code received in ReleaseComplete message from remote endpoint into a CallClearReason.
EXTERN const char * ooGetMsgTypeText (int msgType)
 This function is used to retrieve the description text for a message type.
EXTERN const char * ooGetQ931CauseValueText (int val)
 This function is used to retrieve the text description for a Q931 Cause value in Cause IE.

Typedef Documentation

typedef int(*) cb_OnReceivedSetup(struct OOH323CallData *call, struct Q931Message *pmsg)

This callback is triggered when an H.225 SETUP message is received by the application.

Parameters:
call The call the message is associated with.
pmsg Q.931 message structure.
Returns:
OO_OK if message processing successful or OO_FAILED if not.

Definition at line 281 of file ooq931.h.

typedef int(*) cb_OnReceivedConnect(struct OOH323CallData *call, struct Q931Message *pmsg)

This callback is triggered when an H.225 CONNECT message is received by the application.

Parameters:
call The call the message is associated with.
pmsg Q.931 message structure.
Returns:
OO_OK if message processing successful or OO_FAILED if not.

Definition at line 291 of file ooq931.h.

typedef int(*) cb_OnBuiltSetup(struct OOH323CallData *call, struct Q931Message *pmsg)

This callback is triggered after an H.225 SETUP message has been constructed and is ready to be sent out.

It provides the application with an opportunity to add additional non-standard information.

Parameters:
call The call the message is associated with.
pmsg Q.931 message structure.
Returns:
OO_OK if message processing successful or OO_FAILED if not.

Definition at line 302 of file ooq931.h.

typedef int(*) cb_OnBuiltConnect(struct OOH323CallData *call, struct Q931Message *pmsg)

This callback is triggered after an H.225 CONNECT message has been constructed and is ready to be sent out.

It provides the application with an opportunity to add additional non-standard information.

Parameters:
call The call the message is associated with.
pmsg Q.931 message structure.
Returns:
OO_OK if message processing successful or OO_FAILED if not.

Definition at line 313 of file ooq931.h.


Function Documentation

EXTERN int ooOnReceivedSetup ( struct OOH323CallData call,
Q931Message q931Msg 
)

This function is used to process a received SETUP message.

Parameters:
call Pointer to call for which SETUP message is received.
q931Msg Pointer to the received SETUP message.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooOnReceivedSignalConnect ( struct OOH323CallData call,
Q931Message q931Msg 
)

This function is used to process a received CONNECT message.

It creates H.245 negotiation channel, and starts TCS and MSD procedures.

Parameters:
call Pointer to call for which CONNECT message is received.
q931Msg Pointer to the received q931Msg
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooHandleH2250Message ( struct OOH323CallData call,
Q931Message q931Msg 
)

This function is used to handle received H.2250 messages.

It calls helper functions based on the type of message received.

Parameters:
call Pointer to the call for which a H.2250 message is received
q931Msg Pointer to the received q931Msg
Returns:
OO_OK, on success. OO_FAILED, on failure

EXTERN int ooOnReceivedFacility ( struct OOH323CallData call,
Q931Message pQ931Msg 
)

This function is used to process a received Facility message.

Parameters:
call Handle to the call for which message has been received.
pQ931Msg Pointer the the received Facility message.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooHandleTunneledH245Messages ( struct OOH323CallData call,
H225H323_UU_PDU *  pH323UUPdu 
)

This function is used to process tunneled H245 messages.

Parameters:
call Handle to the call
pH323UUPdu Pointer to the pdu containing tunneled messages.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooHandleStartH245FacilityMessage ( struct OOH323CallData call,
H225Facility_UUIE *  facility 
)

This is a helper function used to handle an startH245 Facility message.

Parameters:
call Handle to the call
facility Pointer to the facility message.

EXTERN int ooH323RetrieveAliases ( struct OOH323CallData call,
H225_SeqOfH225AliasAddress *  pAddresses,
OOAliases **  aliasList 
)

This function is used to retrieve the aliases from Sequence of alias addresses.

Parameters:
call Handle to the call.Null when retrieving registered aliases.
pAddresses Pointer to the sequence of alias addresses.
aliasList Handle to alias list to be populated with retrieved aliases.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooPopulateAliasList ( OOCTXT pctxt,
OOAliases pAliases,
H225_SeqOfH225AliasAddress *  pAliasList 
)

This is a helper function used to populate alias list using aliases.

Parameters:
pctxt Pointer to OOCTXT structure which will be used for memory allocations.
pAliases Pointer to aliases to be used for populating list.
pAliasList Pointer to alias list to be populated.
Returns:
OO_OK, on success. OO_FAILED, otherwise.

EXTERN OOAliases* ooH323GetAliasFromList ( OOAliases aliasList,
int  type,
char *  value 
)

This function is used to search a particular alias in the alias list.

The search can be on the basis of alias type or value or both.

Parameters:
aliasList Handle to the alias list to be searched.
type Type of the alias, if search has to consider type as criterion, otherwise 0.
value Value of the alias, if the search has to consider value as criterion, NULL otherwise.

EXTERN OOAliases* ooH323AddAliasToList ( OOAliases **  pAliasList,
OOCTXT pctxt,
H225AliasAddress *  pAliasAddress 
)

This function is used to add a new alias to alias list.

Parameters:
pAliasList Pointer to Alias list.
pctxt Pointer to OOCTXT structure to be used for memory allocation.
pAliasAddress New alias address to be added.
Returns:
Handle to newly added alias or NULL in case of failure.

int ooH323GetIpPortFromH225TransportAddress ( struct OOH323CallData call,
H225TransportAddress *  h225Address,
char *  ip,
int *  port 
)

This function is used to retrieve ip address and port number from an H225TransportAddress structure.

Parameters:
call Handle to the associated call.
h225Address Pointer to H225TransportAddress structure
ip Pointer to the buffer in which dotted ip address will be returned.
port Pointer to the integer in which port value will be returned.
Returns:
OO_OK, on success; OO_FAILED, on failure.

EXTERN int ooQ931Decode ( struct OOH323CallData call,
Q931Message msg,
int  length,
ASN1OCTET data 
)

This function is invoked to decode a Q931 message.

Parameters:
call Handle to call which owns the message.
msg Pointer to the Q931 message
length Length of the encoded data
data Pointer to the data to be decoded
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooDecodeUUIE ( Q931Message q931Msg  ) 

This function is used to decode the UUIE of the message from the list of ies.

It decodes the User-User ie and populates the userInfo field of the message.

Parameters:
q931Msg Pointer to the message whose User-User ie has to be decoded.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooEncodeUUIE ( Q931Message q931msg  ) 

This function is used to encode the UUIE field of the Q931 message.

It encodes UUIE and adds the encoded data to the list of ies.

Parameters:
q931msg Pointer to the Q931 message whose UUIE field has to be encoded.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN Q931InformationElement* ooQ931GetIE ( const Q931Message q931msg,
int  ieCode 
)

This function is invoked to retrieve an IE element from a Q931 message.

Parameters:
q931msg Pointer to the Q931 message
ieCode IE code for the IE element to be retrieved
Returns:
Pointer to a Q931InformationElement contating the IE element.

EXTERN void ooQ931Print ( const Q931Message q931msg  ) 

This function is invoked to print a Q931 message.

Parameters:
q931msg Pointer to the Q931 message
Returns:
- none

EXTERN int ooCreateQ931Message ( Q931Message **  msg,
int  msgType 
)

This function is invoked to create an outgoing Q931 message.

Parameters:
msg Reference to the pointer of type Q931 message.
msgType Type of Q931 message to be created
Returns:
Completion status - 0 on success, -1 on failure

EXTERN ASN1USINT ooGenerateCallReference ( void   ) 

This function is invoked to generate a unique call reference number.

Returns:
- call reference number

EXTERN int ooGenerateCallIdentifier ( H225CallIdentifier *  callid  ) 

This function is used to generate a unique call identifier for the call.

Parameters:
callid Pointer to the callid structure, which will be populated with the generated callid.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooFreeQ931Message ( Q931Message q931Msg  ) 

This function is invoked to release the memory used up by a Q931 message.

Parameters:
q931Msg Pointer to a Q931 message which has to be freed.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooGetOutgoingQ931Msgbuf ( struct OOH323CallData call,
ASN1OCTET msgbuf,
int *  len,
int *  msgType 
)

This function is invoked to retrive the outgoing message buffer for Q931 message.

Parameters:
call Pointer to call for which outgoing Q931 message has to be retrieved.
msgbuf Pointer to a buffer in which retrieved message will be returned.
len Pointer to int in which length of the buffer will be returned.
msgType Pointer to integer in which message type of the ougoing message is returned.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooSendReleaseComplete ( struct OOH323CallData call  ) 

This function is invoked to send a ReleaseComplete message for the currently active call.

Parameters:
call Pointer to the call for which ReleaseComplete message have to be sent.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooSendCallProceeding ( struct OOH323CallData call  ) 

This function is invoked to send a call proceeding message in response to received setup message.

Parameters:
call Pointer to the call for which CallProceeding message have to be sent.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooSendAlerting ( struct OOH323CallData call  ) 

This function is invoked to send alerting message in response to received setup message.

Parameters:
call Pointer to the call for which Alerting message have to be sent.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooSendFacility ( struct OOH323CallData call  ) 

This function is invoked to send Facility message.

Parameters:
call Pointer to the call for which Facility message have to be sent.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooQ931SendDTMFAsKeyPadIE ( struct OOH323CallData call,
const char *  data 
)

This function is used to send dtmf data as Q931 keypad information element as part of information message.

Parameters:
call Pointer to the call for dtmf data has to be sent.
data Dtmf data to be sent.
Returns:
OO_OK, on success; OO_FAILED, on failure.

EXTERN int ooSendConnect ( struct OOH323CallData call  ) 

This function is invoked to send a Connect message in response to received setup message.

Parameters:
call Pointer to the call for which connect message has to be sent.
Returns:
Completion status - 0 on success, -1 on failure

EXTERN int ooH323MakeCall ( char *  dest,
char *  callToken,
ooCallOptions opts 
)

This function is used to send a SETUP message for outgoing call.

It first creates an H.225 TCP connection with the remote end point and then sends SETUP message over this connection.

Parameters:
dest Destination - IP:Port/alias.
callToken Unique token for the new call.
opts Call specific options. If passed a non-null value, these options will override global endpoint settings.
Returns:
OO_OK, on success. OO_FAILED, on failure

int ooH323CallAdmitted ( struct OOH323CallData call  ) 

Helper function used to make a call once it is approved by the Gk.

In case of no gk, this function is directly called to make a call.

Parameters:
call Handle to the new call.
Returns:
OO_OK, on success. OO_FAILED, on failure

EXTERN int ooH323HandleCallFwdRequest ( struct OOH323CallData call  ) 

This function is used to handle a call forward request sent to local endpoint by remote endpoint.

Parameters:
call Handle to the call which is being forwarded
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooH323ForwardCall ( char *  callToken,
char *  dest 
)

This function is used for forwarding/redirecting a call to third party.

Parameters:
callToken callToken for the call which has to be redirected.
dest Address to which call has to be forwarded. Can be IP:Port or alias.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooH323HangCall ( char *  callToken,
OOCallClearReason  reason 
)

This function is used to hangup a currently active call.

It sets the call state to CLEARING and initiates closing of all logical channels.

Parameters:
callToken Unique token of the call to be hanged.
reason Reason for ending call.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooAcceptCall ( struct OOH323CallData call  ) 

Function to accept a call by sending connect.

This function is used as a helper function to ooSendConnect.

Parameters:
call Pointer to the call for which connect has to be sent
Returns:
OO_OK, on success. OO_FAILED, on failure.

int ooParseDestination ( struct OOH323CallData call,
char *  dest,
char *  parsedIP,
unsigned  len,
OOAliases **  aliasList 
)

This function is used to parse the destination.

Parameters:
call Handle to related call.
dest Destination string to be parsed.
parsedIP Pointer to buffer in which parsed ip:port will be returned.
len Length of the buffer passed.
aliasList Aliase List in which new aliases will be added.
Returns:
OO_OK, on success. OO_FAILED, on failure.

int ooGenerateCallToken ( char *  callToken,
size_t  size 
)

This function is used to generate a new call token.

Parameters:
callToken Handle to the buffer in which new call token will be returned
size size of the buffer
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooSendAsTunneledMessage ( struct OOH323CallData call,
ASN1OCTET msgbuf,
int  h245Len,
int  h245MsgType,
int  associatedChan 
)

This function sends an encoded H.245 message buffer as a tunneled H.245 Facility message.

Parameters:
call Pointer to the call for which H.245 message has to be tunneled.
msgbuf Pointer to the encoded H.245 message to be tunneled.
h245Len Length of the encoded H.245 message buffer.
h245MsgType Type of the H245 message
associatedChan The logical channel number with which the tunneled message is associated. In case of no channel, this value should be 0.
Returns:
OO_OK, on success. OO_FAILED, on failure.

int ooEncodeH225Message ( struct OOH323CallData call,
Q931Message pq931Msg,
ASN1OCTET msgbuf,
size_t  size 
)

This function is used to encode an H.225 message.

Parameters:
call Handle to the call.
pq931Msg Pointer to the message to be encoded.
msgbuf Pointer to the buffer in which encoded message will be returned.
size Size of the buffer passed.
Returns:
OO_OK, on success. OO_FAILED, on failure.

int ooCallEstbTimerExpired ( void *  data  ) 

This is a callback function which is called when there is no CONNECT response from the remote endpoint after the SETUP has been sent and timeout period has passed.

Parameters:
data The callback data registered at the time of timer creation.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooQ931SetKeypadIE ( Q931Message pmsg,
const char *  data 
)

This function is used to add a keypad IE to a Q931 message for sending dtmf.

Parameters:
pmsg Q931 message to which keypad ie has to be added.
data DTMF data to be sent.
Returns:
OO_OK on success, OO_FAILED, on failure.

EXTERN int ooSetBearerCapabilityIE ( Q931Message pmsg,
enum Q931CodingStandard  codingStandard,
enum Q931InformationTransferCapability  capability,
enum Q931TransferMode  transferMode,
enum Q931TransferRate  transferRate,
enum Q931UserInfoLayer1Protocol  userInfoLayer1 
)

This function is used to add a bearer capability IE to a Q931 message.

Parameters:
pmsg Q931 message to which bearer capability ie has to be added.
codingStandard Coding standard to be used.
capability Information transfer capability
transferMode Information transfer mode.(circuit/packet modes).
transferRate Information transfer rate.
userInfoLayer1 User information layer 1 protocol.
Returns:
OO_OK on success, OO_FAILED, on failure.

EXTERN int ooQ931SetCalledPartyNumberIE ( Q931Message pmsg,
const char *  number,
unsigned  plan,
unsigned  type 
)

This function is used to add a called party number ie to a q931 message.

Parameters:
pmsg Q931 message to which CalledPartyNumber IE has to be added.
number Number for called party.
plan Numbering Plan used
type Type of number
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooQ931SetCallingPartyNumberIE ( Q931Message pmsg,
const char *  number,
unsigned  plan,
unsigned  type,
unsigned  presentation,
unsigned  screening 
)

This function is used to add a CallingPartyNumber ie to a q931 message.

Parameters:
pmsg Q931 message to which CallingPartyNumber IE has to be added.
number Number for calling party.
plan Numbering Plan used
type Type of number
presentation Presentation of the address is allowed or restricted.
screening Whether address was provided by endpoint or screened by gatekeeper.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooQ931SetCauseIE ( Q931Message pmsg,
enum Q931CauseValues  cause,
unsigned  coding,
unsigned  location 
)

This function is used to set a cause ie for a q931 message.

Parameters:
pmsg Valid Q931 Message
cause Q931 Cause Value
coding coding standard used. 0 for ITU-T standard coding
location location. 0 for user.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN int ooQ931GetCauseAndReasonCodeFromCallClearReason ( OOCallClearReason  clearReason,
enum Q931CauseValues cause,
unsigned *  reasonCode 
)

This function is used to convert a call clear reason to cause and reason code.

It is used when local user is endoing the call and sending releaseComplete.

Parameters:
clearReason Reason for ending call.
cause Pointer to Q931CauseVaules enum in which cause will be returned.
reasonCode Pointer to unsigned int in which reasonCode will be returned.
Returns:
OO_OK, on success. OO_FAILED, on failure.

EXTERN OOCallClearReason ooGetCallClearReasonFromCauseAndReasonCode ( enum Q931CauseValues  cause,
unsigned  reasonCode 
)

This function is used to convert a cause value and reason code received in ReleaseComplete message from remote endpoint into a CallClearReason.

Parameters:
cause cause value received.
reasonCode reasonCode received.
Returns:
Returns a CallClearReason.

EXTERN const char* ooGetMsgTypeText ( int  msgType  ) 

This function is used to retrieve the description text for a message type.

Parameters:
msgType Message type.
Returns:
The text description string.

EXTERN const char* ooGetQ931CauseValueText ( int  val  ) 

This function is used to retrieve the text description for a Q931 Cause value in Cause IE.

Parameters:
val Q931 Cause value
Returns:
The text description string


This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1