beep.h File Reference

Periodic beeps into the audio of a call. More...

#include "asterisk/optional_api.h"

Include dependency graph for beep.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ast_beep_start (struct ast_channel *chan, unsigned int interval, char *beep_id, size_t len)
int ast_beep_stop (struct ast_channel *chan, const char *beep_id)


Detailed Description

Periodic beeps into the audio of a call.

Definition in file beep.h.


Function Documentation

int ast_beep_start ( struct ast_channel chan,
unsigned int  interval,
char *  beep_id,
size_t  len 
)

Definition at line 502 of file func_periodic_hook.c.

References args, ast_log, AST_MAX_CONTEXT, AST_MAX_EXTENSION, hook_read(), len(), LOG_WARNING, and NULL.

Referenced by mixmonitor_exec(), and start_monitor_exec().

00504 {
00505    char args[AST_MAX_EXTENSION + AST_MAX_CONTEXT + 32];
00506 
00507    snprintf(args, sizeof(args), "%s,%s,%u",
00508          context_name, beep_exten, interval);
00509 
00510    if (hook_read(chan, NULL, args, beep_id, len)) {
00511       ast_log(LOG_WARNING, "Failed to enable periodic beep.\n");
00512       return -1;
00513    }
00514 
00515    return 0;
00516 }

int ast_beep_stop ( struct ast_channel chan,
const char *  beep_id 
)

Definition at line 518 of file func_periodic_hook.c.

References hook_write(), and NULL.

Referenced by ast_monitor_stop(), and stop_mixmonitor_full().

00519 {
00520    return hook_write(chan, NULL, (char *) beep_id, "off");
00521 }


Generated on Thu Apr 16 06:29:04 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6