Exemplo n.º 1
0
static int forkcdr_exec(struct ast_channel *chan, void *data)
{
	int res=0;
	struct localuser *u;
	LOCAL_USER_ADD(u);

	ast_cdr_fork(chan);

	LOCAL_USER_REMOVE(u);
	return res;
}
Exemplo n.º 2
0
static void forkcdr_callback(void *data, struct stasis_subscription *sub, struct stasis_message *message)
{
	struct fork_cdr_message_payload *payload;

	if (stasis_message_type(message) != forkcdr_message_type()) {
		return;
	}

	payload = stasis_message_data(message);
	if (!payload) {
		return;
	}

	if (ast_cdr_fork(payload->channel_name, payload->flags)) {
		ast_log(AST_LOG_WARNING, "Failed to fork CDR for channel %s\n",
			payload->channel_name);
	}
}