3.4.2. gc_AnswerCall( )
When using H.323, the gc_AnswerCall( ) function is used to send the Q.931 CONNECT message to the originating endpoint.
When using SIP, the gc_AnswerCall( ) function is used to send the 200 OK message to the originating endpoint.
Also, the rings parameter is ignored.
Coders can be set in advance of using gc_AnswerCall( ) by using gc_SetUserInfo( ). See Section 3.4.18, gc_SetUserInfo( ) for more information.
The following code example shows how to use the gc_SetUserInfo( ) function to set coder information before calls are answered using gc_AnswerCall( ).
/* Specifying coders before answering calls */ LINEDEV ldev; CRN crn; GC_PARM_BLK *target_datap; /* Define Coder */ IP_CAPABILITY a_DefaultCapability; gc_OpenEx(&ldev, ":N_iptB1T1:M_ipmB1C1:P_H323", EV_ASYNC, 0); /* wait for GCEV_OPENEX event ... */ /* Set default coder for this ldev */ target_datap = NULL; memset(&a_DefaultCapability,0,sizeof(IP_CAPABILITY)); a_DefaultCapability.capability = GCCAP_AUDIO_g7231_5_3k; a_DefaultCapability.direction = IP_CAP_DIR_LCLTRANSMIT; a_DefaultCapability.type = GCCAPTYPE_AUDIO; a_DefaultCapability.extra.audio.frames_per_pkt = 1; a_DefaultCapability.extra.audio.VAD = GCPV_DISABLE; gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY, IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &a_DefaultCapability); /* set both receive and transmit coders to be the same (since the IPTxxx board does not support asymmetrical coders */ memset(&a_DefaultCapability,0,sizeof(IP_CAPABILITY)); a_DefaultCapability.capability = GCCAP_AUDIO_g7231_5_3k; a_DefaultCapability.direction = IP_CAP_DIR_LCLRECEIVE; a_DefaultCapability.type = GCCAPTYPE_AUDIO; a_DefaultCapability.extra.audio.frames_per_pkt = 1; a_DefaultCapability.extra.audio.VAD = GCPV_DISABLE; gc_util_insert_parm_ref(&target_datap, GCSET_CHAN_CAPABILITY, IPPARM_LOCAL_CAPABILITY, sizeof(IP_CAPABILITY), &a_DefaultCapability); gc_SetUserInfo(GCTGT_GCLIB_CHAN, ldev, target_datap, GC_ALLCALLS); gc_util_delete_parm_blk(target_datap); gc_WaitCall(ldev, NULL, NULL, 0, EV_ASYNC); /*... Receive GCEV_OFFERED ... */ /*... Retrieve crn from metaevent... */ gc_AnswerCall(crn, 0, EV_ASYNC); /*... Receive GCEV_ANSWERED ... */
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation