All pastes #36422 Raw Edit

Something

public text v1 · immutable
#36422 ·published 2006-01-11 01:41 UTC
rendered paste body
	chan =	ast_request_and_dial(tech, AST_FORMAT_SLINEAR, data, timeout_int, reason, cid_num, cid_name);
	
	ast_verbose("Done ast_pbx_outgoing_exten\n");
	if (chan ) {
		ast_mutex_unlock(&chan->lock);
	} else {
		ast_verbose("ast_request_and_dial: Failure, could not call tech %s channel %s, reason %d\n", tech, data, reason);
		*rval = BOOLEAN_TO_JSVAL(JS_FALSE); // set the object to false
		return JS_TRUE;
	}

	/* Locked by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
	if (chan ) {

		// Channel was Success Or Now Answer
		
		// Lets check for no answer
		
		ast_verbose("Recived not null chan: check state chan->state %d\n", chan->_state);
		switch ( chan->_state ) {
			case AST_STATE_DOWN: // 0
					break;
			case AST_STATE_RESERVED:  // 1
					break;
			case AST_STATE_OFFHOOK:  // 2
					break;
			case AST_STATE_DIALING:  // 3
					break;
			case AST_STATE_RING:  // 4 
					break;
			case AST_STATE_RINGING: // 5
					break;
			case AST_STATE_BUSY:   // 6
					break;
			case AST_STATE_DIALING_OFFHOOK: // 7
					break;
			case AST_STATE_PRERING: //8
					break;
			}