Sat Feb 11 06:35:33 2012

Asterisk developer's documentation


func_channel.c File Reference

Channel info dialplan functions. More...

#include "asterisk.h"
#include <regex.h>
#include <ctype.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/indications.h"
#include "asterisk/stringfields.h"
#include "asterisk/global_datastores.h"

Include dependency graph for func_channel.c:

Go to the source code of this file.

Defines

#define locked_copy_string(chan, dest, source, len)
#define locked_string_field_set(chan, field, source)

Functions

static void __reg_module (void)
static void __unreg_module (void)
static int func_channel_read (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)
static int func_channel_write (struct ast_channel *chan, const char *function, char *data, const char *value)
static int func_channel_write_real (struct ast_channel *chan, const char *function, char *data, const char *value)
static int func_channels_read (struct ast_channel *chan, const char *function, char *data, char *buf, size_t maxlen)
static int func_mchan_read (struct ast_channel *chan, const char *function, char *data, struct ast_str **buf, ssize_t len)
static int func_mchan_write (struct ast_channel *chan, const char *function, char *data, const char *value)
static int load_module (void)
static int unload_module (void)

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Channel information dialplan functions" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, }
static struct ast_module_infoast_module_info = &__mod_info
static struct ast_custom_function channel_function
static struct ast_custom_function channels_function
static struct ast_custom_function mchan_function
static const char *const transfercapability_table [0x20]


Detailed Description

Channel info dialplan functions.

Author:
Kevin P. Fleming <kpfleming@digium.com>

Ben Winslow

Definition in file func_channel.c.


Define Documentation

#define locked_copy_string ( chan,
dest,
source,
len   ) 

Value:

do { \
      ast_channel_lock(chan); \
      ast_copy_string(dest, source, len); \
      ast_channel_unlock(chan); \
   } while (0)

Definition at line 283 of file func_channel.c.

Referenced by func_channel_read().

#define locked_string_field_set ( chan,
field,
source   ) 

Value:

do { \
      ast_channel_lock(chan); \
      ast_channel_##field##_set(chan, source); \
      ast_channel_unlock(chan); \
   } while (0)

Definition at line 289 of file func_channel.c.

Referenced by func_channel_write_real().


Function Documentation

static void __reg_module ( void   )  [static]

Definition at line 679 of file func_channel.c.

static void __unreg_module ( void   )  [static]

Definition at line 679 of file func_channel.c.

static int func_channel_read ( struct ast_channel chan,
const char *  function,
char *  data,
char *  buf,
size_t  len 
) [static]

Definition at line 302 of file func_channel.c.

References ast_channel::_state, ast_channel::amaflags, ast_channel::appl, ast_bridged_channel(), ast_channel_accountcode(), ast_channel_datastore_find(), ast_channel_hangupsource(), ast_channel_language(), ast_channel_linkedid(), ast_channel_lock, ast_channel_musicclass(), ast_channel_name(), ast_channel_parkinglot(), ast_channel_peeraccount(), ast_channel_uniqueid(), ast_channel_unlock, ast_channel_userfield(), ast_check_hangup(), ast_copy_string(), ast_format_cap_destroy(), ast_format_cap_get_type(), AST_FORMAT_TYPE_AUDIO, AST_FORMAT_TYPE_VIDEO, ast_getformatname(), ast_getformatname_multiple(), ast_log(), ast_print_group(), ast_state2str(), ast_strlen_zero(), ast_channel::callgroup, ast_channel::cdr, ast_channel::context, ast_tone_zone::country, ast_datastore::data, ast_channel::data, ast_channel::exten, ast_channel_tech::func_channel_read, locked_copy_string, LOG_WARNING, ast_secure_call_store::media, ast_channel::nativeformats, pbx_builtin_getvar_helper(), ast_channel::pickupgroup, ast_channel::readformat, secure_call_info, ast_secure_call_store::signaling, ast_channel::tech, ast_channel::transfercapability, ast_channel_tech::type, ast_channel::writeformat, and ast_channel::zone.

00304 {
00305    int ret = 0;
00306    char tmp[512];
00307    struct ast_format_cap *tmpcap;
00308 
00309    if (!strcasecmp(data, "audionativeformat")) {
00310       if ((tmpcap = ast_format_cap_get_type(chan->nativeformats, AST_FORMAT_TYPE_AUDIO))) {
00311          ast_copy_string(buf, ast_getformatname_multiple(tmp, sizeof(tmp), tmpcap), len);
00312          tmpcap = ast_format_cap_destroy(tmpcap);
00313       }
00314    } else if (!strcasecmp(data, "videonativeformat")) {
00315       if ((tmpcap = ast_format_cap_get_type(chan->nativeformats, AST_FORMAT_TYPE_VIDEO))) {
00316          ast_copy_string(buf, ast_getformatname_multiple(tmp, sizeof(tmp), tmpcap), len);
00317          tmpcap = ast_format_cap_destroy(tmpcap);
00318       }
00319    } else if (!strcasecmp(data, "audioreadformat")) {
00320       ast_copy_string(buf, ast_getformatname(&chan->readformat), len);
00321    } else if (!strcasecmp(data, "audiowriteformat")) {
00322       ast_copy_string(buf, ast_getformatname(&chan->writeformat), len);
00323 #ifdef CHANNEL_TRACE
00324    } else if (!strcasecmp(data, "trace")) {
00325       ast_channel_lock(chan);
00326       ast_copy_string(buf, ast_channel_trace_is_enabled(chan) ? "1" : "0", len);
00327       ast_channel_unlock(chan);
00328 #endif
00329    } else if (!strcasecmp(data, "tonezone") && chan->zone)
00330       locked_copy_string(chan, buf, chan->zone->country, len);
00331    else if (!strcasecmp(data, "language"))
00332       locked_copy_string(chan, buf, ast_channel_language(chan), len);
00333    else if (!strcasecmp(data, "musicclass"))
00334       locked_copy_string(chan, buf, ast_channel_musicclass(chan), len);
00335    else if (!strcasecmp(data, "name")) {
00336       locked_copy_string(chan, buf, ast_channel_name(chan), len);
00337    } else if (!strcasecmp(data, "parkinglot"))
00338       locked_copy_string(chan, buf, ast_channel_parkinglot(chan), len);
00339    else if (!strcasecmp(data, "state"))
00340       locked_copy_string(chan, buf, ast_state2str(chan->_state), len);
00341    else if (!strcasecmp(data, "channeltype"))
00342       locked_copy_string(chan, buf, chan->tech->type, len);
00343    else if (!strcasecmp(data, "accountcode"))
00344       locked_copy_string(chan, buf, ast_channel_accountcode(chan), len);
00345    else if (!strcasecmp(data, "checkhangup")) {
00346       ast_channel_lock(chan);
00347       ast_copy_string(buf, ast_check_hangup(chan) ? "1" : "0", len);
00348       ast_channel_unlock(chan);
00349    } else if (!strcasecmp(data, "peeraccount"))
00350       locked_copy_string(chan, buf, ast_channel_peeraccount(chan), len);
00351    else if (!strcasecmp(data, "hangupsource"))
00352       locked_copy_string(chan, buf, ast_channel_hangupsource(chan), len);
00353    else if (!strcasecmp(data, "appname") && chan->appl)
00354       locked_copy_string(chan, buf, chan->appl, len);
00355    else if (!strcasecmp(data, "appdata") && chan->data)
00356       locked_copy_string(chan, buf, chan->data, len);
00357    else if (!strcasecmp(data, "exten") && chan->data)
00358       locked_copy_string(chan, buf, chan->exten, len);
00359    else if (!strcasecmp(data, "context") && chan->data)
00360       locked_copy_string(chan, buf, chan->context, len);
00361    else if (!strcasecmp(data, "userfield") && chan->data)
00362       locked_copy_string(chan, buf, ast_channel_userfield(chan), len);
00363    else if (!strcasecmp(data, "channame") && chan->data)
00364       locked_copy_string(chan, buf, ast_channel_name(chan), len);
00365    else if (!strcasecmp(data, "linkedid")) {
00366       ast_channel_lock(chan);
00367       if (ast_strlen_zero(ast_channel_linkedid(chan))) {
00368          /* fall back on the channel's uniqueid if linkedid is unset */
00369          ast_copy_string(buf, ast_channel_uniqueid(chan), len);
00370       }
00371       else {
00372          ast_copy_string(buf, ast_channel_linkedid(chan), len);
00373       }
00374       ast_channel_unlock(chan);
00375    } else if (!strcasecmp(data, "peer")) {
00376       struct ast_channel *p;
00377       ast_channel_lock(chan);
00378       p = ast_bridged_channel(chan);
00379       if (p || chan->tech || chan->cdr) /* dummy channel? if so, we hid the peer name in the language */
00380          ast_copy_string(buf, (p ? ast_channel_name(p) : ""), len);
00381       else {
00382          /* a dummy channel can still pass along bridged peer info via
00383                            the BRIDGEPEER variable */
00384          const char *pname = pbx_builtin_getvar_helper(chan, "BRIDGEPEER");
00385          if (!ast_strlen_zero(pname))
00386             ast_copy_string(buf, pname, len); /* a horrible kludge, but... how else? */
00387          else
00388             buf[0] = 0;
00389       }
00390       ast_channel_unlock(chan);
00391    } else if (!strcasecmp(data, "uniqueid")) {
00392       locked_copy_string(chan, buf, ast_channel_uniqueid(chan), len);
00393    } else if (!strcasecmp(data, "transfercapability")) {
00394       locked_copy_string(chan, buf, transfercapability_table[chan->transfercapability & 0x1f], len);
00395    } else if (!strcasecmp(data, "callgroup")) {
00396       char groupbuf[256];
00397       locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->callgroup), len);
00398    } else if (!strcasecmp(data, "pickupgroup")) {
00399       char groupbuf[256];
00400       locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->pickupgroup), len);
00401    } else if (!strcasecmp(data, "amaflags")) {
00402       char amabuf[256];
00403       snprintf(amabuf,sizeof(amabuf), "%d", chan->amaflags);
00404       locked_copy_string(chan, buf, amabuf, len);
00405    } else if (!strncasecmp(data, "secure_bridge_", 14)) {
00406       struct ast_datastore *ds;
00407       ast_channel_lock(chan);
00408       if ((ds = ast_channel_datastore_find(chan, &secure_call_info, NULL))) {
00409          struct ast_secure_call_store *encrypt = ds->data;
00410          if (!strcasecmp(data, "secure_bridge_signaling")) {
00411             snprintf(buf, len, "%s", encrypt->signaling ? "1" : "");
00412          } else if (!strcasecmp(data, "secure_bridge_media")) {
00413             snprintf(buf, len, "%s", encrypt->media ? "1" : "");
00414          }
00415       }
00416       ast_channel_unlock(chan);
00417    } else if (!chan->tech || !chan->tech->func_channel_read || chan->tech->func_channel_read(chan, function, data, buf, len)) {
00418       ast_log(LOG_WARNING, "Unknown or unavailable item requested: '%s'\n", data);
00419       ret = -1;
00420    }
00421 
00422    return ret;
00423 }

static int func_channel_write ( struct ast_channel chan,
const char *  function,
char *  data,
const char *  value 
) [static]

Definition at line 545 of file func_channel.c.

References AST_CHAN_WRITE_INFO_T_VERSION, ast_channel_setoption(), AST_OPTION_CHANNEL_WRITE, ast_channel::data, and func_channel_write_real().

00546 {
00547    int res;
00548    ast_chan_write_info_t write_info = {
00549       .version = AST_CHAN_WRITE_INFO_T_VERSION,
00550       .write_fn = func_channel_write_real,
00551       .chan = chan,
00552       .function = function,
00553       .data = data,
00554       .value = value,
00555    };
00556 
00557    res = func_channel_write_real(chan, function, data, value);
00558    ast_channel_setoption(chan, AST_OPTION_CHANNEL_WRITE, &write_info, sizeof(write_info), 0);
00559 
00560    return res;
00561 }

static int func_channel_write_real ( struct ast_channel chan,
const char *  function,
char *  data,
const char *  value 
) [static]

Definition at line 425 of file func_channel.c.

References accountcode, ast_channel::amaflags, ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_lock, ast_channel_setoption(), ast_channel_unlock, ast_datastore_alloc, ast_false(), ast_free, ast_get_group(), ast_get_indication_zone(), ast_log(), AST_OPTION_RXGAIN, AST_OPTION_TXGAIN, ast_set_hangupsource(), ast_tone_zone_ref(), ast_tone_zone_unref(), ast_true(), ast_channel::callgroup, ast_datastore::data, ast_channel_tech::func_channel_write, language, locked_string_field_set, LOG_ERROR, LOG_WARNING, ast_secure_call_store::media, musicclass, parkinglot, ast_channel::pickupgroup, secure_call_info, ast_secure_call_store::signaling, ast_channel::tech, ast_channel::transfercapability, and ast_channel::zone.

Referenced by func_channel_write().

00427 {
00428    int ret = 0;
00429    signed char gainset;
00430 
00431    if (!strcasecmp(data, "language"))
00432       locked_string_field_set(chan, language, value);
00433    else if (!strcasecmp(data, "parkinglot"))
00434       locked_string_field_set(chan, parkinglot, value);
00435    else if (!strcasecmp(data, "musicclass"))
00436       locked_string_field_set(chan, musicclass, value);
00437    else if (!strcasecmp(data, "accountcode"))
00438       locked_string_field_set(chan, accountcode, value);
00439    else if (!strcasecmp(data, "userfield"))
00440       locked_string_field_set(chan, userfield, value);
00441    else if (!strcasecmp(data, "amaflags")) {
00442       ast_channel_lock(chan);
00443       if(isdigit(*value)) {
00444          sscanf(value, "%30d", &chan->amaflags);
00445       } else if (!strcasecmp(value,"OMIT")){
00446          chan->amaflags = 1;
00447       } else if (!strcasecmp(value,"BILLING")){
00448          chan->amaflags = 2;
00449       } else if (!strcasecmp(value,"DOCUMENTATION")){
00450          chan->amaflags = 3;
00451       }
00452       ast_channel_unlock(chan);
00453    } else if (!strcasecmp(data, "peeraccount"))
00454       locked_string_field_set(chan, peeraccount, value);
00455    else if (!strcasecmp(data, "hangupsource"))
00456       /* XXX - should we be forcing this here? */
00457       ast_set_hangupsource(chan, value, 0);
00458 #ifdef CHANNEL_TRACE
00459    else if (!strcasecmp(data, "trace")) {
00460       ast_channel_lock(chan);
00461       if (ast_true(value)) 
00462          ret = ast_channel_trace_enable(chan);
00463       else if (ast_false(value))
00464          ret = ast_channel_trace_disable(chan);
00465       else {
00466          ret = -1;
00467          ast_log(LOG_WARNING, "Invalid value for CHANNEL(trace).");
00468       }
00469       ast_channel_unlock(chan);
00470    }
00471 #endif
00472    else if (!strcasecmp(data, "tonezone")) {
00473       struct ast_tone_zone *new_zone;
00474       if (!(new_zone = ast_get_indication_zone(value))) {
00475          ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value);
00476          ret = -1;   
00477       } else {
00478          ast_channel_lock(chan);
00479          if (chan->zone) {
00480             chan->zone = ast_tone_zone_unref(chan->zone);
00481          }
00482          chan->zone = ast_tone_zone_ref(new_zone);
00483          ast_channel_unlock(chan);
00484          new_zone = ast_tone_zone_unref(new_zone);
00485       }
00486    } else if (!strcasecmp(data, "callgroup")) {
00487       chan->callgroup = ast_get_group(value);
00488    } else if (!strcasecmp(data, "pickupgroup")) {
00489       chan->pickupgroup = ast_get_group(value);
00490    } else if (!strcasecmp(data, "txgain")) {
00491       sscanf(value, "%4hhd", &gainset);
00492       ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0);
00493    } else if (!strcasecmp(data, "rxgain")) {
00494       sscanf(value, "%4hhd", &gainset);
00495       ast_channel_setoption(chan, AST_OPTION_RXGAIN, &gainset, sizeof(gainset), 0);
00496    } else if (!strcasecmp(data, "transfercapability")) {
00497       unsigned short i;
00498       for (i = 0; i < 0x20; i++) {
00499          if (!strcasecmp(transfercapability_table[i], value) && strcmp(value, "UNK")) {
00500             chan->transfercapability = i;
00501             break;
00502          }
00503       }
00504    } else if (!strncasecmp(data, "secure_bridge_", 14)) {
00505       struct ast_datastore *ds;
00506       struct ast_secure_call_store *store;
00507 
00508       if (!chan || !value) {
00509          return -1;
00510       }
00511 
00512       ast_channel_lock(chan);
00513       if (!(ds = ast_channel_datastore_find(chan, &secure_call_info, NULL))) {
00514          if (!(ds = ast_datastore_alloc(&secure_call_info, NULL))) {
00515             ast_channel_unlock(chan);
00516             return -1;
00517          }
00518          if (!(store = ast_calloc(1, sizeof(*store)))) {
00519             ast_channel_unlock(chan);
00520             ast_free(ds);
00521             return -1;
00522          }
00523          ds->data = store;
00524          ast_channel_datastore_add(chan, ds);
00525       } else {
00526          store = ds->data;
00527       }
00528       ast_channel_unlock(chan);
00529 
00530       if (!strcasecmp(data, "secure_bridge_signaling")) {
00531          store->signaling = ast_true(value) ? 1 : 0;
00532       } else if (!strcasecmp(data, "secure_bridge_media")) {
00533          store->media = ast_true(value) ? 1 : 0;
00534       }
00535    } else if (!chan->tech->func_channel_write
00536        || chan->tech->func_channel_write(chan, function, data, value)) {
00537       ast_log(LOG_WARNING, "Unknown or unavailable item requested: '%s'\n",
00538             data);
00539       ret = -1;
00540    }
00541 
00542    return ret;
00543 }

static int func_channels_read ( struct ast_channel chan,
const char *  function,
char *  data,
char *  buf,
size_t  maxlen 
) [static]

Definition at line 569 of file func_channel.c.

References ast_channel_iterator_all_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_channel_unref, ast_log(), ast_strlen_zero(), and LOG_WARNING.

00570 {
00571    struct ast_channel *c = NULL;
00572    regex_t re;
00573    int res;
00574    size_t buflen = 0;
00575    struct ast_channel_iterator *iter;
00576 
00577    buf[0] = '\0';
00578 
00579    if (!ast_strlen_zero(data)) {
00580       if ((res = regcomp(&re, data, REG_EXTENDED | REG_ICASE | REG_NOSUB))) {
00581          regerror(res, &re, buf, maxlen);
00582          ast_log(LOG_WARNING, "Error compiling regular expression for %s(%s): %s\n", function, data, buf);
00583          return -1;
00584       }
00585    }
00586 
00587    if (!(iter = ast_channel_iterator_all_new())) {
00588       if (!ast_strlen_zero(data)) {
00589          regfree(&re);
00590       }
00591       return -1;
00592    }
00593 
00594    while ((c = ast_channel_iterator_next(iter))) {
00595       ast_channel_lock(c);
00596       if (ast_strlen_zero(data) || regexec(&re, ast_channel_name(c), 0, NULL, 0) == 0) {
00597          size_t namelen = strlen(ast_channel_name(c));
00598          if (buflen + namelen + (ast_strlen_zero(buf) ? 0 : 1) + 1 < maxlen) {
00599             if (!ast_strlen_zero(buf)) {
00600                strcat(buf, " ");
00601                buflen++;
00602             }
00603             strcat(buf, ast_channel_name(c));
00604             buflen += namelen;
00605          } else {
00606             ast_log(LOG_WARNING, "Number of channels exceeds the available buffer space.  Output will be truncated!\n");
00607          }
00608       }
00609       ast_channel_unlock(c);
00610       c = ast_channel_unref(c);
00611    }
00612 
00613    ast_channel_iterator_destroy(iter);
00614 
00615    if (!ast_strlen_zero(data)) {
00616       regfree(&re);
00617    }
00618 
00619    return 0;
00620 }

static int func_mchan_read ( struct ast_channel chan,
const char *  function,
char *  data,
struct ast_str **  buf,
ssize_t  len 
) [static]

Definition at line 627 of file func_channel.c.

References ast_channel_get_by_name(), ast_channel_linkedid(), ast_channel_unref, and ast_str_substitute_variables().

00629 {
00630    struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan));
00631    char *template = alloca(4 + strlen(data));
00632    sprintf(template, "${%s}", data); /* SAFE */
00633    ast_str_substitute_variables(buf, len, mchan ? mchan : chan, template);
00634    if (mchan) {
00635       ast_channel_unref(mchan);
00636    }
00637    return 0;
00638 }

static int func_mchan_write ( struct ast_channel chan,
const char *  function,
char *  data,
const char *  value 
) [static]

Definition at line 640 of file func_channel.c.

References ast_channel_get_by_name(), ast_channel_linkedid(), ast_channel_unref, and pbx_builtin_setvar_helper().

00642 {
00643    struct ast_channel *mchan = ast_channel_get_by_name(ast_channel_linkedid(chan));
00644    pbx_builtin_setvar_helper(mchan ? mchan : chan, data, value);
00645    if (mchan) {
00646       ast_channel_unref(mchan);
00647    }
00648    return 0;
00649 }

static int load_module ( void   )  [static]

Definition at line 668 of file func_channel.c.

References ast_custom_function_register.

00669 {
00670    int res = 0;
00671 
00672    res |= ast_custom_function_register(&channel_function);
00673    res |= ast_custom_function_register(&channels_function);
00674    res |= ast_custom_function_register(&mchan_function);
00675 
00676    return res;
00677 }

static int unload_module ( void   )  [static]

Definition at line 657 of file func_channel.c.

References ast_custom_function_unregister().

00658 {
00659    int res = 0;
00660 
00661    res |= ast_custom_function_unregister(&channel_function);
00662    res |= ast_custom_function_unregister(&channels_function);
00663    res |= ast_custom_function_unregister(&mchan_function);
00664 
00665    return res;
00666 }


Variable Documentation

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Channel information dialplan functions" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } [static]

Definition at line 679 of file func_channel.c.

Definition at line 679 of file func_channel.c.

Initial value:

 {
   .name = "CHANNEL",
   .read = func_channel_read,
   .write = func_channel_write,
}

Definition at line 563 of file func_channel.c.

Initial value:

 {
   .name = "CHANNELS",
   .read = func_channels_read,
}

Definition at line 622 of file func_channel.c.

Initial value:

 {
   .name = "MASTER_CHANNEL",
   .read2 = func_mchan_read,
   .write = func_mchan_write,
}

Definition at line 651 of file func_channel.c.

const char* const transfercapability_table[0x20] [static]

Initial value:

 {
   "SPEECH", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
   "DIGITAL", "RESTRICTED_DIGITAL", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
   "3K1AUDIO", "DIGITAL_W_TONES", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK",
   "VIDEO", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", "UNK", }

Definition at line 296 of file func_channel.c.


Generated on Sat Feb 11 06:35:33 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6