08.01.2013 Views

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gc_Make<strong>Call</strong>( ) — make an outgoing call<br />

Parameter Description<br />

numberstr called party’s telephone number (must be terminated with “\0”).<br />

Maximum length is 32 digits.<br />

makecallp points to the GC_MAKECALL_BLK structure; see<br />

GC_MAKECALL_BLK, on page 441 for details. The<br />

GC_MAKECALL_BLK structure lists the parameters used to make an<br />

outbound call. Assigning a NULL to the makecallp parameter indicates<br />

that the default values should be used for the call.<br />

timeout time interval (in seconds) during which the call must be established, or the<br />

function will return with a time-out error. This parameter is ignored when<br />

set to 0. Not all call control libraries support this argument in<br />

asynchronous mode. (For Dialogic ® DM3 boards, timeout is supported in<br />

both the synchronous and asynchronous modes.)<br />

See the appropriate <strong>Global</strong> <strong>Call</strong> Technology Guide for technologyspecific<br />

information.<br />

mode set to EV_ASYNC for asynchronous execution or to EV_SYNC for<br />

synchronous execution<br />

In the asynchronous mode, if the function is successfully initiated but connection is not achieved<br />

(no GCEV_CONNECTED event returned), then the application must issue gc_Drop<strong>Call</strong>( ) and<br />

gc_Release<strong>Call</strong>Ex( ) functions to terminate the call completely.<br />

In the synchronous mode, if the *crnp is zero, the call state is Null. A Null state indicates that the<br />

call was fully terminated and that another gc_Make<strong>Call</strong>( ) function can be issued. For non-zero<br />

*crnp values, the application must issue gc_Drop<strong>Call</strong>( ) and gc_Release<strong>Call</strong>Ex( ) functions to<br />

terminate the call completely before issuing another gc_Make<strong>Call</strong>( ) function.<br />

The GCEV_ALERTING event (enabled by default) notifies the application that the call has<br />

reached its destination but is not yet connected to the called party. When this event is received, the<br />

call state changes to Alerting. In the Alerting state, the reception of a GCEV_CONNECTED event<br />

(or, if in synchronous mode, the successful completion of the function) causes a transition to the<br />

Connected state thus indicating a complete call connection.<br />

The GCEV_CALLSTATUS event informs the application that a time-out or a no answer (call<br />

control library dependent) condition occurred. This event does not cause any state change. Not all<br />

call control libraries generate this event (for example, the ISDN library).<br />

If glare handling is not specified in the protocol, the inbound call prevails when glare occurs.<br />

Table 9 lists error conditions, associated event/return values, and the result/error value returned. For<br />

all errors, the following apply:<br />

Asynchronous: When an error condition is encountered, an event value such as<br />

GCEV_TASKFAIL, GCEV_CALLSTATUS, or GCEV_DISCONNECTED is returned. Issue<br />

a gc_ResultValue( ) function to retrieve the reason or result code for the event and then issue a<br />

gc_ResultMsg( ) function to retrieve the ASCII message describing the error condition. When<br />

an error condition occurs in asynchronous mode, you must issue the gc_Drop<strong>Call</strong>( ) and<br />

gc_Release<strong>Call</strong>Ex( ) functions before you can initiate your next call.<br />

230 Dialogic ® <strong>Global</strong> <strong>Call</strong> <strong>API</strong> <strong>Library</strong> <strong>Reference</strong> — January 2008<br />

Dialogic Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!