Sat Mar 26 11:19:03 2011

Asterisk developer's documentation


devicestate.h File Reference

Device state management. More...

#include "asterisk/channelstate.h"

Include dependency graph for devicestate.h:

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

Go to the source code of this file.

Data Structures

struct  ast_devstate_aggregate
 You shouldn't care about the contents of this struct. More...

Enumerations

enum  ast_device_state {
  AST_DEVICE_UNKNOWN, AST_DEVICE_NOT_INUSE, AST_DEVICE_INUSE, AST_DEVICE_BUSY,
  AST_DEVICE_INVALID, AST_DEVICE_UNAVAILABLE, AST_DEVICE_RINGING, AST_DEVICE_RINGINUSE,
  AST_DEVICE_ONHOLD, AST_DEVICE_TOTAL
}
 Device States. More...

Functions

enum ast_device_state ast_device_state (const char *device)
 Asks a channel for device state.
int ast_device_state_changed (const char *fmt,...)
 Tells Asterisk the State for Device is changed. (Accept change notification, add it to change queue.).
int ast_device_state_changed_literal (const char *device)
 Tells Asterisk the State for Device is changed.
const char * ast_devstate2str (enum ast_device_state devstate) attribute_pure
 Find devicestate as text message for output.
void ast_devstate_aggregate_add (struct ast_devstate_aggregate *agg, enum ast_device_state state)
 Add a device state to the aggregate device state.
void ast_devstate_aggregate_init (struct ast_devstate_aggregate *agg)
 Initialize aggregate device state.
enum ast_device_state ast_devstate_aggregate_result (struct ast_devstate_aggregate *agg)
 Get the aggregate device state result.
int ast_devstate_changed (enum ast_device_state state, const char *fmt,...)
 Tells Asterisk the State for Device is changed.
int ast_devstate_changed_literal (enum ast_device_state state, const char *device)
 Tells Asterisk the State for Device is changed.
int ast_devstate_prov_add (const char *label, ast_devstate_prov_cb_type callback)
 Add device state provider.
int ast_devstate_prov_del (const char *label)
 Remove device state provider.
const char * ast_devstate_str (enum ast_device_state devstate) attribute_pure
 Convert device state to text string that is easier to parse.
enum ast_device_state ast_devstate_val (const char *val)
 Convert device state from text to integer value.
int ast_enable_distributed_devstate (void)
 Enable distributed device state processing.
enum ast_device_state ast_parse_device_state (const char *device)
 Search the Channels by Name.
enum ast_device_state ast_state_chan2dev (enum ast_channel_state chanstate)
 Convert channel state to devicestate.
const char * devstate2str (enum ast_device_state devstate) attribute_pure
 Convert device state to text string for output.

Variables

enum ast_device_state(* ast_devstate_prov_cb_type )(const char *data)
 Devicestate provider call back.


Detailed Description

Device state management.

To subscribe to device state changes, use the generic ast_event_subscribe method. For an example, see apps/app_queue.c.

Todo:
Currently, when the state of a device changes, the device state provider calls one of the functions defined here to queue an object to say that the state of a device has changed. However, this does not include the new state. Another thread processes these device state change objects and calls the device state provider's callback to figure out what the new state is. It would make a lot more sense for the new state to be included in the original function call that says the state of a device has changed. However, it will take a lot of work to change this.

Definition in file devicestate.h.


Enumeration Type Documentation

Device States.

Note:
The order of these states may not change because they are included in Asterisk events which may be transmitted across the network to other servers.
Enumerator:
AST_DEVICE_UNKNOWN  Device is valid but channel didn't know state
AST_DEVICE_NOT_INUSE  Device is not used
AST_DEVICE_INUSE  Device is in use
AST_DEVICE_BUSY  Device is busy
AST_DEVICE_INVALID  Device is invalid
AST_DEVICE_UNAVAILABLE  Device is unavailable
AST_DEVICE_RINGING  Device is ringing
AST_DEVICE_RINGINUSE  Device is ringing *and* in use
AST_DEVICE_ONHOLD  Device is on hold
AST_DEVICE_TOTAL 

Definition at line 51 of file devicestate.h.

00051                       {
00052    AST_DEVICE_UNKNOWN,      /*!< Device is valid but channel didn't know state */
00053    AST_DEVICE_NOT_INUSE,    /*!< Device is not used */
00054    AST_DEVICE_INUSE,        /*!< Device is in use */
00055    AST_DEVICE_BUSY,         /*!< Device is busy */
00056    AST_DEVICE_INVALID,      /*!< Device is invalid */
00057    AST_DEVICE_UNAVAILABLE,  /*!< Device is unavailable */
00058    AST_DEVICE_RINGING,      /*!< Device is ringing */
00059    AST_DEVICE_RINGINUSE,    /*!< Device is ringing *and* in use */
00060    AST_DEVICE_ONHOLD,       /*!< Device is on hold */
00061    AST_DEVICE_TOTAL,        /*/ Total num of device states, used for testing */
00062 };


Function Documentation

enum ast_device_state ast_device_state ( const char *  device  ) 

Asks a channel for device state.

Parameters:
device like a dial string
Asks a channel for device state, data is normally a number from a dial string used by the low level module Tries the channel device state callback if not supported search in the active channels list for the device.

Return values:
an AST_DEVICE_??? state
-1 on failure

Definition at line 358 of file devicestate.c.

References _ast_device_state().

00359 {
00360    /* This function is called from elsewhere in the code to find out the
00361     * current state of a device.  Check the cache, first. */
00362 
00363    return _ast_device_state(device, 1);
00364 }

int ast_device_state_changed ( const char *  fmt,
  ... 
)

Tells Asterisk the State for Device is changed. (Accept change notification, add it to change queue.).

Parameters:
fmt device name like a dial string with format parameters
Asterisk polls the new extension states and calls the registered callbacks for the changed extensions

Return values:
0 on success
-1 on failure
Note:
This is deprecated in favor of ast_devstate_changed()
Version:
1.6.1 deprecated

Definition at line 518 of file devicestate.c.

References AST_DEVICE_UNKNOWN, ast_devstate_changed_literal(), and AST_MAX_EXTENSION.

00519 {
00520    char buf[AST_MAX_EXTENSION];
00521    va_list ap;
00522 
00523    va_start(ap, fmt);
00524    vsnprintf(buf, sizeof(buf), fmt, ap);
00525    va_end(ap);
00526 
00527    return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, buf);
00528 }

int ast_device_state_changed_literal ( const char *  device  ) 

Tells Asterisk the State for Device is changed.

Parameters:
device device name like a dial string
Asterisk polls the new extension states and calls the registered callbacks for the changed extensions

Return values:
0 on success
-1 on failure
Note:
This is deprecated in favor of ast_devstate_changed_literal()
Version:
1.6.1 deprecated

Definition at line 501 of file devicestate.c.

References AST_DEVICE_UNKNOWN, and ast_devstate_changed_literal().

00502 {
00503    return ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, dev);
00504 }

const char* ast_devstate2str ( enum ast_device_state  devstate  ) 

Find devicestate as text message for output.

Definition at line 209 of file devicestate.c.

Referenced by __queues_show(), do_state_change(), extension_state_cb(), handle_statechange(), notify_metermaids(), page_exec(), and process_collection().

00210 {
00211    return devstatestring[devstate][0];
00212 }

void ast_devstate_aggregate_add ( struct ast_devstate_aggregate *  agg,
enum ast_device_state  state 
)

Add a device state to the aggregate device state.

Parameters:
[in] agg the state object
[in] state the state to add
Returns:
nothing
Since:
1.6.1

Definition at line 741 of file devicestate.c.

References ast_devstate_aggregate::all_busy, ast_devstate_aggregate::all_free, ast_devstate_aggregate::all_unavail, ast_devstate_aggregate::all_unknown, AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_INVALID, AST_DEVICE_NOT_INUSE, AST_DEVICE_ONHOLD, AST_DEVICE_RINGING, AST_DEVICE_RINGINUSE, AST_DEVICE_TOTAL, AST_DEVICE_UNAVAILABLE, AST_DEVICE_UNKNOWN, ast_devstate_aggregate::busy, ast_devstate_aggregate::in_use, ast_devstate_aggregate::on_hold, and ast_devstate_aggregate::ring.

Referenced by ast_extension_state2(), and process_collection().

00742 {
00743    switch (state) {
00744    case AST_DEVICE_NOT_INUSE:
00745       agg->all_unknown = 0;
00746       agg->all_unavail = 0;
00747       agg->all_busy = 0;
00748       break;
00749    case AST_DEVICE_INUSE:
00750       agg->in_use = 1;
00751       agg->all_unavail = 0;
00752       agg->all_free = 0;
00753       agg->all_unknown = 0;
00754       break;
00755    case AST_DEVICE_RINGING:
00756       agg->ring = 1;
00757       agg->all_unavail = 0;
00758       agg->all_free = 0;
00759       agg->all_unknown = 0;
00760       break;
00761    case AST_DEVICE_RINGINUSE:
00762       agg->in_use = 1;
00763       agg->ring = 1;
00764       agg->all_unavail = 0;
00765       agg->all_free = 0;
00766       agg->all_unknown = 0;
00767       break;
00768    case AST_DEVICE_ONHOLD:
00769       agg->all_unknown = 0;
00770       agg->all_unavail = 0;
00771       agg->all_free = 0;
00772       agg->on_hold = 1;
00773       break;
00774    case AST_DEVICE_BUSY:
00775       agg->all_unknown = 0;
00776       agg->all_unavail = 0;
00777       agg->all_free = 0;
00778       agg->busy = 1;
00779       agg->in_use = 1;
00780       break;
00781    case AST_DEVICE_UNAVAILABLE:
00782       agg->all_unknown = 0;
00783    case AST_DEVICE_INVALID:
00784       agg->all_busy = 0;
00785       agg->all_free = 0;
00786       break;
00787    case AST_DEVICE_UNKNOWN:
00788       agg->all_busy = 0;
00789       agg->all_free = 0;
00790       break;
00791    case AST_DEVICE_TOTAL: /* not a device state, included for completeness. */
00792       break;
00793    }
00794 }

void ast_devstate_aggregate_init ( struct ast_devstate_aggregate *  agg  ) 

Initialize aggregate device state.

Parameters:
[in] agg the state object
Returns:
nothing
Since:
1.6.1

Definition at line 731 of file devicestate.c.

References ast_devstate_aggregate::all_busy, ast_devstate_aggregate::all_free, ast_devstate_aggregate::all_unavail, and ast_devstate_aggregate::all_unknown.

Referenced by ast_extension_state2(), and process_collection().

00732 {
00733    memset(agg, 0, sizeof(*agg));
00734 
00735    agg->all_unknown = 1;
00736    agg->all_unavail = 1;
00737    agg->all_busy = 1;
00738    agg->all_free = 1;
00739 }

enum ast_device_state ast_devstate_aggregate_result ( struct ast_devstate_aggregate *  agg  ) 

Get the aggregate device state result.

Parameters:
[in] agg the state object
Returns:
the aggregate device state after adding some number of device states.
Since:
1.6.1

Definition at line 797 of file devicestate.c.

References ast_devstate_aggregate::all_busy, ast_devstate_aggregate::all_free, ast_devstate_aggregate::all_unavail, ast_devstate_aggregate::all_unknown, AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_NOT_INUSE, AST_DEVICE_ONHOLD, AST_DEVICE_RINGING, AST_DEVICE_RINGINUSE, AST_DEVICE_UNAVAILABLE, AST_DEVICE_UNKNOWN, ast_devstate_aggregate::busy, ast_devstate_aggregate::in_use, ast_devstate_aggregate::on_hold, and ast_devstate_aggregate::ring.

Referenced by ast_extension_state2(), and process_collection().

00798 {
00799    if (agg->all_free)
00800       return AST_DEVICE_NOT_INUSE;
00801    if ((agg->in_use || agg->on_hold) && agg->ring)
00802       return AST_DEVICE_RINGINUSE;
00803    if (agg->ring)
00804       return AST_DEVICE_RINGING;
00805    if (agg->busy)
00806       return AST_DEVICE_BUSY;
00807    if (agg->in_use)
00808       return AST_DEVICE_INUSE;
00809    if (agg->on_hold)
00810       return AST_DEVICE_ONHOLD;
00811    if (agg->all_busy)
00812       return AST_DEVICE_BUSY;
00813    if (agg->all_unknown)
00814       return AST_DEVICE_UNKNOWN;
00815    if (agg->all_unavail)
00816       return AST_DEVICE_UNAVAILABLE;
00817 
00818    return AST_DEVICE_NOT_INUSE;
00819 }

int ast_devstate_changed ( enum ast_device_state  state,
const char *  fmt,
  ... 
)

Tells Asterisk the State for Device is changed.

Parameters:
state the new state of the device
fmt device name like a dial string with format parameters
The new state of the device will be sent off to any subscribers of device states. It will also be stored in the internal event cache.

Return values:
0 on success
-1 on failure

Definition at line 506 of file devicestate.c.

References ast_devstate_changed_literal(), and AST_MAX_EXTENSION.

Referenced by __expire_registry(), __iax2_poke_noanswer(), agent_call(), agent_hangup(), agent_read(), calendar_devstate_change(), conf_run(), dahdi_pri_update_span_devstate(), destroy_event(), devstate_write(), expire_register(), handle_cli_devstate_change(), handle_offhook_message(), handle_onhook_message(), handle_response_peerpoke(), handle_soft_key_event_message(), handle_stimulus_message(), join_conference_bridge(), leave_conference_bridge(), load_module(), login_exec(), notify_metermaids(), reg_source_db(), register_verify(), sip_peer_hold(), sip_poke_noanswer(), skinny_register(), skinny_unregister(), sla_change_trunk_state(), sla_handle_hold_event(), sla_station_exec(), socket_process(), update_call_counter(), and update_registry().

00507 {
00508    char buf[AST_MAX_EXTENSION];
00509    va_list ap;
00510 
00511    va_start(ap, fmt);
00512    vsnprintf(buf, sizeof(buf), fmt, ap);
00513    va_end(ap);
00514 
00515    return ast_devstate_changed_literal(state, buf);
00516 }

int ast_devstate_changed_literal ( enum ast_device_state  state,
const char *  device 
)

Tells Asterisk the State for Device is changed.

Parameters:
state the new state of the device
device device name like a dial string with format parameters
The new state of the device will be sent off to any subscribers of device states. It will also be stored in the internal event cache.

Return values:
0 on success
-1 on failure

Definition at line 463 of file devicestate.c.

References ast_calloc, ast_cond_signal, AST_DEVICE_UNKNOWN, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_UNLOCK, change_thread, state_change::device, devstate_event(), and do_state_change().

Referenced by ast_channel_destructor(), ast_device_state_changed(), ast_device_state_changed_literal(), ast_devstate_changed(), ast_setstate(), and dahdi_new().

00464 {
00465    struct state_change *change;
00466 
00467    /* 
00468     * If we know the state change (how nice of the caller of this function!)
00469     * then we can just generate a device state event. 
00470     *
00471     * Otherwise, we do the following:
00472     *   - Queue an event up to another thread that the state has changed
00473     *   - In the processing thread, it calls the callback provided by the
00474     *     device state provider (which may or may not be a channel driver)
00475     *     to determine the state.
00476     *   - If the device state provider does not know the state, or this is
00477     *     for a channel and the channel driver does not implement a device
00478     *     state callback, then we will look through the channel list to
00479     *     see if we can determine a state based on active calls.
00480     *   - Once a state has been determined, a device state event is generated.
00481     */
00482 
00483    if (state != AST_DEVICE_UNKNOWN) {
00484       devstate_event(device, state);
00485    } else if (change_thread == AST_PTHREADT_NULL || !(change = ast_calloc(1, sizeof(*change) + strlen(device)))) {
00486       /* we could not allocate a change struct, or */
00487       /* there is no background thread, so process the change now */
00488       do_state_change(device);
00489    } else {
00490       /* queue the change */
00491       strcpy(change->device, device);
00492       AST_LIST_LOCK(&state_changes);
00493       AST_LIST_INSERT_TAIL(&state_changes, change, list);
00494       ast_cond_signal(&change_pending);
00495       AST_LIST_UNLOCK(&state_changes);
00496    }
00497 
00498    return 1;
00499 }

int ast_devstate_prov_add ( const char *  label,
ast_devstate_prov_cb_type  callback 
)

Add device state provider.

Parameters:
label to use in hint, like label:object
callback Callback
Return values:
0 success
-1 failure

Definition at line 367 of file devicestate.c.

References ast_calloc, ast_copy_string(), AST_RWLIST_INSERT_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, devstate_prov::callback, and devstate_prov::label.

Referenced by ast_features_init(), and load_module().

00368 {
00369    struct devstate_prov *devprov;
00370 
00371    if (!callback || !(devprov = ast_calloc(1, sizeof(*devprov))))
00372       return -1;
00373 
00374    devprov->callback = callback;
00375    ast_copy_string(devprov->label, label, sizeof(devprov->label));
00376 
00377    AST_RWLIST_WRLOCK(&devstate_provs);
00378    AST_RWLIST_INSERT_HEAD(&devstate_provs, devprov, list);
00379    AST_RWLIST_UNLOCK(&devstate_provs);
00380 
00381    return 0;
00382 }

int ast_devstate_prov_del ( const char *  label  ) 

Remove device state provider.

Parameters:
label to use in hint, like label:object
Return values:
-1 on failure
0 on success

Definition at line 385 of file devicestate.c.

References ast_free, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and devstate_prov::label.

Referenced by unload_module().

00386 {
00387    struct devstate_prov *devcb;
00388    int res = -1;
00389 
00390    AST_RWLIST_WRLOCK(&devstate_provs);
00391    AST_RWLIST_TRAVERSE_SAFE_BEGIN(&devstate_provs, devcb, list) {
00392       if (!strcasecmp(devcb->label, label)) {
00393          AST_RWLIST_REMOVE_CURRENT(list);
00394          ast_free(devcb);
00395          res = 0;
00396          break;
00397       }
00398    }
00399    AST_RWLIST_TRAVERSE_SAFE_END;
00400    AST_RWLIST_UNLOCK(&devstate_provs);
00401 
00402    return res;
00403 }

const char* ast_devstate_str ( enum ast_device_state  devstate  ) 

Convert device state to text string that is easier to parse.

Parameters:
devstate Current device state

Definition at line 233 of file devicestate.c.

Referenced by aji_devstate_cb(), and devstate_read().

00234 {
00235    return devstatestring[state][1];
00236 }

enum ast_device_state ast_devstate_val ( const char *  val  ) 

Convert device state from text to integer value.

Parameters:
val The text representing the device state. Valid values are anything that comes after AST_DEVICE_ in one of the defined values.
Returns:
The AST_DEVICE_ integer value

Definition at line 238 of file devicestate.c.

References AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_INVALID, AST_DEVICE_NOT_INUSE, AST_DEVICE_ONHOLD, AST_DEVICE_RINGING, AST_DEVICE_RINGINUSE, AST_DEVICE_UNAVAILABLE, and AST_DEVICE_UNKNOWN.

Referenced by aji_handle_pubsub_event(), custom_devstate_callback(), devstate_write(), handle_cli_devstate_change(), and load_module().

00239 {
00240    if (!strcasecmp(val, "NOT_INUSE"))
00241       return AST_DEVICE_NOT_INUSE;
00242    else if (!strcasecmp(val, "INUSE"))
00243       return AST_DEVICE_INUSE;
00244    else if (!strcasecmp(val, "BUSY"))
00245       return AST_DEVICE_BUSY;
00246    else if (!strcasecmp(val, "INVALID"))
00247       return AST_DEVICE_INVALID;
00248    else if (!strcasecmp(val, "UNAVAILABLE"))
00249       return AST_DEVICE_UNAVAILABLE;
00250    else if (!strcasecmp(val, "RINGING"))
00251       return AST_DEVICE_RINGING;
00252    else if (!strcasecmp(val, "RINGINUSE"))
00253       return AST_DEVICE_RINGINUSE;
00254    else if (!strcasecmp(val, "ONHOLD"))
00255       return AST_DEVICE_ONHOLD;
00256 
00257    return AST_DEVICE_UNKNOWN;
00258 }

int ast_enable_distributed_devstate ( void   ) 

Enable distributed device state processing.

By default, Asterisk assumes that device state change events will only be originating from one instance. If a module gets loaded and configured such that multiple instances of Asterisk will be sharing device state, this function should be called to enable distributed device state processing. It is off by default to save on unnecessary processing.

Return values:
0 success
-1 failure

Definition at line 821 of file devicestate.c.

References ast_cond_init, AST_EVENT_DEVICE_STATE_CHANGE, AST_EVENT_IE_END, ast_event_subscribe(), ast_log(), ast_mutex_init, ast_pthread_create_background, devstate_change_collector_cb(), devstate_collector, LOG_ERROR, and run_devstate_collector().

Referenced by add_publish_event(), add_subscribe_event(), and aji_init_event_distribution().

00822 {
00823    if (devstate_collector.enabled) {
00824       return 0;
00825    }
00826 
00827    devstate_collector.event_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE,
00828       devstate_change_collector_cb, "devicestate_engine_enable_distributed", NULL, AST_EVENT_IE_END);
00829 
00830    if (!devstate_collector.event_sub) {
00831       ast_log(LOG_ERROR, "Failed to create subscription for the device state change collector\n");
00832       return -1;
00833    }
00834 
00835    ast_mutex_init(&devstate_collector.lock);
00836    ast_cond_init(&devstate_collector.cond, NULL);
00837    if (ast_pthread_create_background(&devstate_collector.thread, NULL, run_devstate_collector, NULL) < 0) {
00838       ast_log(LOG_ERROR, "Unable to start device state collector thread.\n");
00839       return -1;
00840    }
00841 
00842    devstate_collector.enabled = 1;
00843 
00844    return 0;
00845 }

enum ast_device_state ast_parse_device_state ( const char *  device  ) 

Search the Channels by Name.

Parameters:
device like a dial string
Search the Device in active channels by compare the channel name against the device name. Compared are only the first chars to the first '-' char.

Return values:
AST_DEVICE_UNKNOWN if no channel found
AST_DEVICE_INUSE if a channel is found
Search the Channels by Name.

Note:
find channels with the device's name in it This function is only used for channels that does not implement devicestate natively

Definition at line 265 of file devicestate.c.

References ast_channel::_state, ast_channel_get_by_name_prefix(), AST_CHANNEL_NAME, ast_channel_unref, AST_DEVICE_INUSE, AST_DEVICE_RINGING, AST_DEVICE_UNKNOWN, AST_STATE_RINGING, and match().

Referenced by _ast_device_state(), and chanavail_exec().

00266 {
00267    struct ast_channel *chan;
00268    char match[AST_CHANNEL_NAME];
00269    enum ast_device_state res;
00270 
00271    snprintf(match, sizeof(match), "%s-", device);
00272 
00273    if (!(chan = ast_channel_get_by_name_prefix(match, strlen(match)))) {
00274       return AST_DEVICE_UNKNOWN;
00275    }
00276 
00277    res = (chan->_state == AST_STATE_RINGING) ? AST_DEVICE_RINGING : AST_DEVICE_INUSE;
00278    
00279    chan = ast_channel_unref(chan);
00280 
00281    return res;
00282 }

enum ast_device_state ast_state_chan2dev ( enum ast_channel_state  chanstate  ) 

Convert channel state to devicestate.

Parameters:
chanstate Current channel state
Since:
1.6.1

Definition at line 220 of file devicestate.c.

References AST_DEVICE_UNKNOWN.

Referenced by dahdi_new().

00221 {
00222    int i;
00223    chanstate &= 0xFFFF;
00224    for (i = 0; chan2dev[i].chan != -100; i++) {
00225       if (chan2dev[i].chan == chanstate) {
00226          return chan2dev[i].dev;
00227       }
00228    }
00229    return AST_DEVICE_UNKNOWN;
00230 }

const char* devstate2str ( enum ast_device_state  devstate  ) 

Convert device state to text string for output.

Parameters:
devstate Current device state

Definition at line 215 of file devicestate.c.

00216 {
00217    return devstatestring[devstate][0];
00218 }


Variable Documentation

enum ast_device_state(* ast_devstate_prov_cb_type)(const char *data)

Devicestate provider call back.


Generated on Sat Mar 26 11:19:08 2011 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.9