# h324Start

Creates an H.245 stack for the specified MUX endpoint and sets the initial values needed to begin an exchange with the client (such as resetting PMSYNC and the video sequence number).

#### Prototype

DWORD h324Start ( CTAHD ctahd, MSPHD msphd, H324_START_PARAMS *params)

Argument | Description
ctahd | CTA handle for the application event queue.
msphd | MSPP handle associated with the MUX endpoint.
params | Pointer to the H324_START_PARAMS structure that holds initial parameters for the H.324 session: typedef struct tag_H324_START_PARAMS { DWORD size; int terminalType; int iCapCount; int iCap[16]; H324_BOOL bAutoChannelSetup; } H324_START_PARAMS; For information about the fields in this structure, see H324_START_PARAMS.

#### Return values

Return value | Description
SUCCESS |
H324ERR_INITIALIZE_STACK_FAILED | Unable to initialize the H.245 stack.
H324ERR_INTERNAL_ERROR | Internal error in the 3G-324M Middleware.
H324ERR_MUTEX_LOCK_FAILED | Internal error trying to lock mutex.
H324ERR_NOT_INITIALIZED | h324Initialize was not called first.

#### Events

Event | Description
H324EVN_FAST_CALL_STEUP_DONE | MONA MPC fast call setup is complete, and the H.324M Middleware was initialized for the specified MUX.
H324EVN_START_DONE | H.324M Middleware was initialized for the specified MUX, and provides one of the following status codes: CTA_REASON_FINISHED – Successful call to h324Start. The H.324M Middleware was initialized for the specified MUX endpoint. CTA_REASON_TIMEOUT – H.223 level synchronization problem with the remote terminal. The initialization of the MUX endpoint failed.

#### Details

If no parameters are provided, a set of defaults is used. The parameters contain an array of the following capability types (iCap):

Value | Description
0 | H324_MPEG4_VIDEO
1 | H324_H263_VIDEO
2 | H324_H261_VIDEO (Not supported)
3 | H324_G711_AUDIO (Not supported)
4 | H324_G723_AUDIO
5 | H324_AMR_AUDIO
6 | H324_H264_VIDEO

Use the array to specify a terminal capabilities set that you can then modify.

When the H.324M Middleware is initialized for the specified MUX, the application receives H324EVN_FAST_CALL_STEUP_DONE instead of H324EVN_START_DONE, if it used MONA MPC for fast call setup.

#### See also

h324Stop

#### Example

Example to declare a single Audio codec capability and single Video codec capability
H324_START_PARAMS params;
params.size = sizeof(params);
params.iCapCount = 2;
params.terminalType = 201;
params.iCap[0] = H324_AMR_AUDIO;
params.iCap[1] = H324_MPEG4_VIDEO;
params.bAutoChannelSetup = TRUE;
ret = h324Start(pCtx->ctahd, pCfg->MuxEp.hd, &params);
if(ret != SUCCESS)
{
printf("Error: h324Start returned 0x%08x\n",ret);
return ret;
}