Previous PageTable Of Contents../index.htmlIndexNext Page

cc_CallState( )

Description | Cautions | Example | Errors | See Also

Name:

int cc_CallState(crn, state_buf)

Inputs:

CRN crn

  call reference number

 

int* state_buf

  pointer to requested state number

Returns:

0 on success
< 0 on failure

Includes:

cclib.h

Category:

System tools

Mode:

synchronous

Technology:

BRI/2; BRI/SC; PRI (all protocols)

Top Of PageDescription

The cc_CallState( ) function retrieves the state of a call associated with a particular call reference number (CRN). The call state, which is stored in the firmware, changes only when a valid message is sent or received during a given state. For more on call states, see Section 3.3. ISDN Call Control States.

Parameter

Description

crn:

The call reference number. Each call needs a CRN.

state_buf:

The pointer to the location where the state value is returned. The supported states are as follows:

  CCST_ACCEPTED - An inbound call was accepted; the call is in the Accepted state.

  CCST_ALERTING - The call is waiting for the destination party to answer; the call is in the alerting state (call alerted sent or received)

  CCST_CONNECTED - An inbound or outbound call was connected; the call is in the Connected state.

  CCST_DIALING - An outbound call request was received; the call is in the Dialing state.

  CCST_DISCONNECTED - The call was disconnected from the network; the call is in the Disconnected state.

 

  CCST_IDLE - The call is not active; the call is in the Idle state.

  CCST_NULL - The call was released; the call is in the Null state.

  CCST_OFFERED - An inbound call was received; the call is in the Offered state.

Top Of PageCautions

Due to normal process latency time, the state value acquired may not reflect the current state of the call. The state retrieved will be associated with the last event received by the application.

Top Of PageExample

Top Of PageErrors

If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be used to interpret the reason code. Error codes are defined in the files ccerr.h, isdnerr.h and isdncmd.h.

Error codes from the cc_CallState( ) function include the following:

Error Code

Description

ERR_ISDN_LIB | E_ISBADIF

Bad interface number

ERR_ISDN_LIB | E_ISBADTS

Bad time slot

ERR_ISDN_LIB | E_ISCALLRELATED

Call related event

Top Of PageSee Also

None


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated December, 2001