예제 #1
0
static int sendnoise(struct ast_channel *chan, int ms)
{
    int res;
    res = ast_tonepair_start(chan, 1537, 2195, ms, 8192);
    if (!res) {
        res = ast_waitfordigit(chan, ms);
        ast_tonepair_stop(chan);
    }
    return res;
}
예제 #2
0
파일: app_disa.c 프로젝트: axiatp/asterisk
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
	const struct tone_zone_sound *ts = NULL;
	if(ast_app_has_voicemail(mailbox, NULL))
		ts = ast_get_indication_tone(chan->zone, "dialrecall");
	else
		ts = ast_get_indication_tone(chan->zone, "dial");
	if (ts)
		ast_playtones_start(chan, 0, ts->data, 0);
	else
		ast_tonepair_start(chan, 350, 440, 0, 0);
}
예제 #3
0
파일: app_disa.c 프로젝트: piyawad/test1
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
	struct ast_tone_zone_sound *ts = NULL;

	if (ast_app_has_voicemail(mailbox, NULL)) {
		ts = ast_get_indication_tone(ast_channel_zone(chan), "dialrecall");
	} else {
		ts = ast_get_indication_tone(ast_channel_zone(chan), "dial");
	}

	if (ts) {
		ast_playtones_start(chan, 0, ts->data, 0);
		ts = ast_tone_zone_sound_unref(ts);
	} else {
		ast_tonepair_start(chan, 350, 440, 0, 0);
	}
}