Asterisk - The Open Source Telephony Project GIT-master-2de1a68
Data Fields
ast_generator Struct Reference

#include <channel.h>

Data Fields

void *(* alloc )(struct ast_channel *chan, void *params)
 
void(* digit )(struct ast_channel *chan, char digit)
 
int(* generate )(struct ast_channel *chan, void *data, int len, int samples)
 
void(* release )(struct ast_channel *chan, void *data)
 
void(* write_format_change )(struct ast_channel *chan, void *data)
 

Detailed Description

Todo:
Add an explanation of an Asterisk generator

Definition at line 225 of file channel.h.

Field Documentation

◆ alloc

void *(* alloc) (struct ast_channel *chan, void *params)

Definition at line 226 of file channel.h.

Referenced by ast_activate_generator(), and spandsp_fax_gateway_start().

◆ digit

void(* digit) (struct ast_channel *chan, char digit)

This gets called when DTMF_END frames are read from the channel

Definition at line 235 of file channel.h.

Referenced by __ast_read().

◆ generate

int(* generate) (struct ast_channel *chan, void *data, int len, int samples)

This function gets called with the channel unlocked, but is called in the context of the channel thread so we know the channel is not going to disappear. This callback is responsible for locking the channel as necessary.

Definition at line 233 of file channel.h.

Referenced by __ast_read(), ast_read_generator_actions(), and generator_force().

◆ release

void(* release) (struct ast_channel *chan, void *data)

Channel is locked during this function callback.

Definition at line 228 of file channel.h.

Referenced by ast_activate_generator(), ast_hangup(), and deactivate_generator_nolock().

◆ write_format_change

void(* write_format_change) (struct ast_channel *chan, void *data)

This gets called when the write format on a channel is changed while generating. The channel is locked during this callback.

Definition at line 238 of file channel.h.

Referenced by generator_write_format_change().


The documentation for this struct was generated from the following file: