Example #1
0
static int adsi_unload_session(struct ast_channel *chan)
{
	unsigned char dsp[256] = "";
	int bytes = 0;

	/* Connect to session */
	bytes += adsi_disconnect_session(dsp + bytes);
	bytes += adsi_voice_mode(dsp + bytes, 0);

	/* Prepare key setup messages */
	if (adsi_transmit_message_full(chan, dsp, bytes, ADSI_MSG_DISPLAY, 0)) {
		return -1;
	}

	return 0;
}
Example #2
0
int adsi_unload_session(struct ast_channel *chan)
{
	char dsp[256];
	int bytes;

	memset(dsp, 0, sizeof(dsp));

	/* Connect to session */
	bytes = 0;
	bytes += adsi_disconnect_session(dsp + bytes);
	bytes += adsi_voice_mode(dsp + bytes, 0);

	/* Prepare key setup messages */
	if (adsi_transmit_message(chan, dsp, bytes, ADSI_MSG_DISPLAY))
		return -1;
	return 0;
}