Dialogic Dialogic Global Call IP IP Phone User Manual


 
323
Dialogic Corporation
gc_util_insert_parm_ref(&parmblkp, IPSET_FOIP, IPPARM_T38_CONNECT,
(sizeof(IP_CONNECT)), (void *)(&ipConnect));
gc_SetUserInfo(GCTGT_GCLIB_CRN, pline->crn, parmblkp, GC_SINGLECALL);
gc_util_delete_parm_blk(parmblkp);
/* Initiate T.38 codec switch */
gc_util_insert_parm_ref(&parmblkp, IPSET_SWITCH_CODEC, IPPARM_T38_INITIATE,
sizeof(int), NULL);
gc_Extension(GCTGT_GCLIB_CRN,pline->crn, IPEXTID_CHANGEMODE,
parmblkp, NULL, EV_ASYNC);
gc_util_delete_parm_blk(parmblkp);
break;
case GCEV_EXTENSIONCMPLT:
/* received extension complete event for T.38 initiation*/
/* do nothing */
break;
case GCEV_EXTENSION:
/* received extension event for media readiness */
ext_evtblkp = (EXTENSIONEVTBLK *) metaEvent.extevtdatap;
parmblkp = &ext_evtblkp->parmblk;
while (t_gcParmDatap = gc_util_next_parm(parmblkp, t_gcParmDatap))
{
switch(t_gcParmDatap->set_ID)
{
case IPSET_SWITCH_CODEC:
switch(t_gcParmDatap->parm_ID)
{
case IPPARM_READY:
/* Ready to send and receive fax */
fx_sendfax();
break;
:
:
}
break;
}
}
break;
:
}
:
}
4.26.4 Associating a T.38 Fax Device with a Media Device When a
Fax Request is Received
During a voice call, a T.38 Fax request can be received by a RequestMode (H.323) or re-INVITE
(SIP) message. The application receives notification of the request as a GCEV_EXTENSION
event. A T.38 Fax device must then be associated with the Media device by filling in an
IP_CONNECT structure with the appropriate T.38 Fax and Media device handles and using the
gc_SetUserInfo( ) function. To continue to accept the request, the gc_Extension( ) function is
used as described in Section 4.26.5, “Accepting/Rejecting a Request to Switch Between Audio and
T.38 Fax”, on page 325. The following code provides an example: