Sat Mar 24 23:29:49 2007

Asterisk developer's documentation


musiconhold.h File Reference

Music on hold handling. More...

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

Go to the source code of this file.

Functions

void ast_install_music_functions (int(*start_ptr)(struct ast_channel *, char *), void(*stop_ptr)(struct ast_channel *), void(*cleanup_ptr)(struct ast_channel *))
void ast_moh_cleanup (struct ast_channel *chan)
int ast_moh_start (struct ast_channel *chan, char *mclass)
void ast_moh_stop (struct ast_channel *chan)
void ast_uninstall_music_functions (void)


Detailed Description

Music on hold handling.

Definition in file musiconhold.h.


Function Documentation

void ast_install_music_functions int(*)(struct ast_channel *, char *)  start_ptr,
void(*)(struct ast_channel *)  stop_ptr,
void(*)(struct ast_channel *)  cleanup_ptr
 

Definition at line 3743 of file channel.c.

References ast_moh_cleanup_ptr, ast_moh_start_ptr, and ast_moh_stop_ptr.

Referenced by load_module(), and reload().

03747 {
03748    ast_moh_start_ptr = start_ptr;
03749    ast_moh_stop_ptr = stop_ptr;
03750    ast_moh_cleanup_ptr = cleanup_ptr;
03751 }

void ast_moh_cleanup struct ast_channel chan  ) 
 

Definition at line 3779 of file channel.c.

References ast_moh_cleanup_ptr.

Referenced by ast_channel_free().

03780 {
03781    if(ast_moh_cleanup_ptr)
03782         ast_moh_cleanup_ptr(chan);
03783 }

int ast_moh_start struct ast_channel chan,
char *  mclass
 

Turn on music on hold on a given channel

Definition at line 3761 of file channel.c.

References ast_moh_start_ptr, ast_verbose(), option_verbose, and VERBOSE_PREFIX_3.

Referenced by __login_exec(), agent_hangup(), builtin_atxfer(), builtin_blindtransfer(), cb_events(), do_parking_thread(), handle_request(), handle_setmusic(), moh0_exec(), moh1_exec(), moh3_exec(), pbx_builtin_waitexten(), process_sdp(), queue_exec(), retrydial_exec(), say_periodic_announcement(), say_position(), socket_read(), zt_handle_event(), and zt_hangup().

03762 {
03763    if (ast_moh_start_ptr)
03764       return ast_moh_start_ptr(chan, mclass);
03765 
03766    if (option_verbose > 2)
03767       ast_verbose(VERBOSE_PREFIX_3 "Music class %s requested but no musiconhold loaded.\n", mclass ? mclass : "default");
03768    
03769    return 0;
03770 }

void ast_moh_stop struct ast_channel chan  ) 
 

Turn off music on hold on a given channel

Definition at line 3773 of file channel.c.

References ast_moh_stop_ptr.

Referenced by __zt_exception(), agent_new(), attempt_transfer(), builtin_atxfer(), builtin_blindtransfer(), cb_events(), do_parking_thread(), handle_hd_hf(), handle_request(), handle_request_bye(), handle_request_refer(), handle_setmusic(), misdn_transfer_bc(), moh0_exec(), moh1_exec(), moh4_exec(), park_exec(), pbx_builtin_waitexten(), process_sdp(), retrydial_exec(), say_periodic_announcement(), say_position(), socket_read(), ss_thread(), zt_handle_event(), and zt_hangup().

03774 {
03775    if(ast_moh_stop_ptr)
03776       ast_moh_stop_ptr(chan);
03777 }

void ast_uninstall_music_functions void   ) 
 

Definition at line 3753 of file channel.c.

References ast_moh_cleanup_ptr, ast_moh_start_ptr, and ast_moh_stop_ptr.

03754 {
03755    ast_moh_start_ptr = NULL;
03756    ast_moh_stop_ptr = NULL;
03757    ast_moh_cleanup_ptr = NULL;
03758 }


Generated on Sat Mar 24 23:29:50 2007 for Asterisk - the Open Source PBX by  doxygen 1.4.6