Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:48:58 2009

## Asterisk developer's documentation

# func_moh.c File Reference

Functions for reading or setting the MusicOnHold class. More...

`#include <stdlib.h>`
`#include "asterisk.h"`
`#include "asterisk/channel.h"`
`#include "asterisk/pbx.h"`
`#include "asterisk/utils.h"`

Include dependency graph for func_moh.c:

Go to the source code of this file.

## Functions

static char * | function_moh_read (struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
static void | function_moh_write (struct ast_channel *chan, char *cmd, char *data, const char *value)

## Variables

static struct ast_custom_function | moh_function

## Detailed Description

Functions for reading or setting the MusicOnHold class.

Definition in file func_moh.c.

## Function Documentation

static char* function_moh_read | ( | struct ast_channel * | chan,
|  | char * | cmd,
|  | char * | data,
|  | char * | buf,
|  | size_t | len |
| ) |  |  | `[static]`

Definition at line 33 of file func_moh.c.

References ast_channel::musicclass.

    00034 {
    00035    ast_copy_string(buf, chan ? chan->musicclass : "", len);
    00036
    00037    return buf;
    00038 }

static void function_moh_write | ( | struct ast_channel * | chan,
|  | char * | cmd,
|  | char * | data,
|  | const char * | value |
| ) |  |  | `[static]`

Definition at line 40 of file func_moh.c.

References ast_channel::musicclass.

    00041 {
    00042    if (chan)
    00043       ast_copy_string(chan->musicclass, value, sizeof(chan->musicclass));
    00044 }

## Variable Documentation

struct ast_custom_function moh_function`[static]`

Definition at line 49 of file func_moh.c.