Dialogic 05-2239-009 User Manual

Page of 604
325
Dialogic Corporation
4.26.5
Accepting/Rejecting a Request to Switch Between Audio 
and T.38 Fax
After T.38 coder change request has been received, followed by association of T.38 Fax device with 
Media device as described in 
, on page 323, the application can use the gc_Extension( ) 
function to accept or reject the request as follows: 
To accept the request, the GC_PARM_BLK associated with the gc_Extension( ) function 
includes components that indicate acceptance, specifically IPSET_SWITCH_CODEC and 
IPPARM_ACCEPT. A RequestModeAck (H.323) or 200 OK (SIP) message is not sent until 
the request is accepted. The following code provides an example: 
     /* Reject the incoming request */
     
     INT32 acceptCodecSwitchRequest()
     {
        GC_PARM_BLK *parmblkp = NULL;
        :
        gc_util_insert_parm_val(&parmblkp, IPSET_SWITCH_CODEC, IPPARM_ACCEPT, 
                                sizeof(int), NULL);
        gc_Extension(GCTGT_GCLIB_CRN,pline->crn, IPEXTID_CHANGEMODE,
                     parmblkp, NULL, EV_ASYNC);
        gc_util_delete_parm_blk(parmblkp);
         
     }
To reject the request, the GC_PARM_BLK associated with the gc_Extension( ) function 
includes components that indicate rejection, specifically IPSET_SWITCH_CODEC and 
IPPARM_REJECT. The reason for rejecting the request is also included in the 
GC_PARM_BLK. 
 describes the supported 
reject reasons that can be used in this context. For H.323, reasons prefixed by 
“IPEC_Q931Cause” can be used. For SIP, reasons prefixed by “IPEC_SIPReason” can be 
used. The reason parameter corresponds to a RequestModeReject cause (H.323) or a negative 
response code (SIP). The following code provides an example: 
     /* Reject the incoming request */
     
     INT32 rejectCodecSwitchRequest()
     {
        GC_PARM_BLK *parmblkp = NULL;
        :
        :
        /* Reject with reason being busy, SIP */
        gc_util_insert_parm_val(&parmblkp, IPSET_SWITCH_CODEC, IPPARM_REJECT, 
                                sizeof(int), IPEC_SIPReasonStatus486BusyHere);
        gc_Extension(GCTGT_GCLIB_CRN, pline->crn, IPEXTID_CHANGEMODE, 
                     parmblkp, NULL, EV_ASYNC);
        gc_util_delete_parm_blk(parmblkp);
     }
4.26.6
Sending a T.38 Fax in a Session Without Audio Established
The Dialogic
®
 Global Call API supports the transmission of fax information in a session that does 
not already have an audio connection established. To send T.38 Fax in such a session, the 
application must use the gc_SetConfigData( ) function to specify “Manual” mode, then associate a