Sat Mar 26 11:26:14 2011

Asterisk developer's documentation


res_calendar_icalendar.c File Reference

Resource for handling iCalendar calendars. More...

#include "asterisk.h"
#include <libical/ical.h>
#include <ne_session.h>
#include <ne_uri.h>
#include <ne_request.h>
#include <ne_auth.h>
#include <ne_redirect.h>
#include "asterisk/module.h"
#include "asterisk/calendar.h"
#include "asterisk/lock.h"
#include "asterisk/config.h"
#include "asterisk/astobj2.h"

Include dependency graph for res_calendar_icalendar.c:

Go to the source code of this file.

Data Structures

struct  icalendar_pvt

Functions

static void __reg_module (void)
static void __unreg_module (void)
static int auth_credentials (void *userdata, const char *realm, int attempts, char *username, char *secret)
static icalcomponent * fetch_icalendar (struct icalendar_pvt *pvt)
static int fetch_response_reader (void *data, const char *block, size_t len)
static void * ical_load_calendar (void *data)
static void icalendar_add_event (icalcomponent *comp, struct icaltime_span *span, void *data)
static void icalendar_destructor (void *obj)
static void icalendar_update_events (struct icalendar_pvt *pvt)
static time_t icalfloat_to_timet (icaltimetype time)
static int load_module (void)
static int unload_module (void)
static void * unref_icalendar (void *obj)

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk iCalendar .ics file integration" , .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_DEVSTATE_PLUGIN, }
static struct ast_module_info * ast_module_info = &__mod_info
static struct ast_calendar_tech ical_tech


Detailed Description

Resource for handling iCalendar calendars.

Definition in file res_calendar_icalendar.c.


Function Documentation

static void __reg_module ( void   )  [static]

Definition at line 498 of file res_calendar_icalendar.c.

static void __unreg_module ( void   )  [static]

Definition at line 498 of file res_calendar_icalendar.c.

static int auth_credentials ( void *  userdata,
const char *  realm,
int  attempts,
char *  username,
char *  secret 
) [static]

Definition at line 110 of file res_calendar_icalendar.c.

References ast_log(), LOG_WARNING, ast_calendar::name, icalendar_pvt::owner, icalendar_pvt::secret, and icalendar_pvt::user.

Referenced by ical_load_calendar().

00111 {
00112    struct icalendar_pvt *pvt = userdata;
00113 
00114    if (attempts > 1) {
00115       ast_log(LOG_WARNING, "Invalid username or password for iCalendar '%s'\n", pvt->owner->name);
00116       return -1;
00117    }
00118 
00119    ne_strnzcpy(username, pvt->user, NE_ABUFSIZ);
00120    ne_strnzcpy(secret, pvt->secret, NE_ABUFSIZ);
00121 
00122    return 0;
00123 }

static icalcomponent* fetch_icalendar ( struct icalendar_pvt *  pvt  )  [static]

Definition at line 125 of file res_calendar_icalendar.c.

References ast_free, ast_log(), ast_str_buffer(), ast_str_create(), ast_str_strlen(), ast_strlen_zero(), fetch_response_reader(), LOG_ERROR, LOG_WARNING, ast_calendar::name, icalendar_pvt::owner, icalendar_pvt::session, icalendar_pvt::uri, and icalendar_pvt::url.

Referenced by ical_load_calendar().

00126 {
00127    int ret;
00128    struct ast_str *response;
00129    ne_request *req;
00130    icalcomponent *comp = NULL;
00131 
00132    if (!pvt) {
00133       ast_log(LOG_ERROR, "There is no private!\n");
00134    }
00135 
00136    if (!(response = ast_str_create(512))) {
00137       ast_log(LOG_ERROR, "Could not allocate memory for response.\n");
00138       return NULL;
00139    }
00140 
00141    req = ne_request_create(pvt->session, "GET", pvt->uri.path);
00142    ne_add_response_body_reader(req, ne_accept_2xx, fetch_response_reader, &response);
00143 
00144    ret = ne_request_dispatch(req);
00145    if (ret != NE_OK || !ast_str_strlen(response)) {
00146       ast_log(LOG_WARNING, "Unable to retrieve iCalendar '%s' from '%s': %s\n", pvt->owner->name, pvt->url, ne_get_error(pvt->session));
00147       ast_free(response);
00148       return NULL;
00149    }
00150 
00151    if (!ast_strlen_zero(ast_str_buffer(response))) {
00152       comp = icalparser_parse_string(ast_str_buffer(response));
00153    }
00154    ast_free(response);
00155 
00156    return comp;
00157 }

static int fetch_response_reader ( void *  data,
const char *  block,
size_t  len 
) [static]

Definition at line 94 of file res_calendar_icalendar.c.

References ast_free, ast_malloc, and ast_str_append().

Referenced by fetch_icalendar().

00095 {
00096    struct ast_str **response = data;
00097    unsigned char *tmp;
00098 
00099    if (!(tmp = ast_malloc(len + 1))) {
00100       return -1;
00101    }
00102    memcpy(tmp, block, len);
00103    tmp[len] = '\0';
00104    ast_str_append(response, 0, "%s", tmp);
00105    ast_free(tmp);
00106 
00107    return 0;
00108 }

static void * ical_load_calendar ( void *  data  )  [static]

Definition at line 343 of file res_calendar_icalendar.c.

References ao2_alloc, ao2_trylock, ao2_unlock, ast_calendar_config_acquire(), ast_calendar_config_release(), ast_calendar_event_container_alloc(), ast_cond_timedwait, ast_debug, ast_log(), ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_tvnow(), ast_variable_browse(), auth_credentials(), icalendar_pvt::data, icalendar_pvt::events, fetch_icalendar(), icalendar_destructor(), icalendar_update_events(), LOG_ERROR, LOG_WARNING, ast_variable::name, ast_calendar::name, ast_variable::next, icalendar_pvt::owner, ast_calendar::refresh, refreshlock, secret, icalendar_pvt::session, ast_calendar::tech_pvt, ast_calendar::unload, ast_calendar::unloading, unref_icalendar(), icalendar_pvt::uri, icalendar_pvt::url, url, and ast_variable::value.

00344 {
00345    struct icalendar_pvt *pvt;
00346    const struct ast_config *cfg;
00347    struct ast_variable *v;
00348    struct ast_calendar *cal = void_data;
00349    ast_mutex_t refreshlock;
00350 
00351    if (!(cal && (cfg = ast_calendar_config_acquire()))) {
00352       ast_log(LOG_ERROR, "You must enable calendar support for res_icalendar to load\n");
00353       return NULL;
00354    }
00355    if (ao2_trylock(cal)) {
00356       if (cal->unloading) {
00357          ast_log(LOG_WARNING, "Unloading module, load_calendar cancelled.\n");
00358       } else {
00359          ast_log(LOG_WARNING, "Could not lock calendar, aborting!\n");
00360       }
00361       ast_calendar_config_release();
00362       return NULL;
00363    }
00364 
00365    if (!(pvt = ao2_alloc(sizeof(*pvt), icalendar_destructor))) {
00366       ast_log(LOG_ERROR, "Could not allocate icalendar_pvt structure for calendar: %s\n", cal->name);
00367       ast_calendar_config_release();
00368       return NULL;
00369    }
00370 
00371    pvt->owner = cal;
00372 
00373    if (!(pvt->events = ast_calendar_event_container_alloc())) {
00374       ast_log(LOG_ERROR, "Could not allocate space for fetching events for calendar: %s\n", cal->name);
00375       pvt = unref_icalendar(pvt);
00376       ao2_unlock(cal);
00377       ast_calendar_config_release();
00378       return NULL;
00379    }
00380 
00381    if (ast_string_field_init(pvt, 32)) {
00382       ast_log(LOG_ERROR, "Couldn't allocate string field space for calendar: %s\n", cal->name);
00383       pvt = unref_icalendar(pvt);
00384       ao2_unlock(cal);
00385       ast_calendar_config_release();
00386       return NULL;
00387    }
00388 
00389    for (v = ast_variable_browse(cfg, cal->name); v; v = v->next) {
00390       if (!strcasecmp(v->name, "url")) {
00391          ast_string_field_set(pvt, url, v->value);
00392       } else if (!strcasecmp(v->name, "user")) {
00393          ast_string_field_set(pvt, user, v->value);
00394       } else if (!strcasecmp(v->name, "secret")) {
00395          ast_string_field_set(pvt, secret, v->value);
00396       }
00397    }
00398 
00399    ast_calendar_config_release();
00400 
00401    if (ast_strlen_zero(pvt->url)) {
00402       ast_log(LOG_WARNING, "No URL was specified for iCalendar '%s' - skipping.\n", cal->name);
00403       pvt = unref_icalendar(pvt);
00404       ao2_unlock(cal);
00405       return NULL;
00406    }
00407 
00408    if (ne_uri_parse(pvt->url, &pvt->uri) || pvt->uri.host == NULL || pvt->uri.path == NULL) {
00409       ast_log(LOG_WARNING, "Could not parse url '%s' for iCalendar '%s' - skipping.\n", pvt->url, cal->name);
00410       pvt = unref_icalendar(pvt);
00411       ao2_unlock(cal);
00412       return NULL;
00413    }
00414 
00415    if (pvt->uri.scheme == NULL) {
00416       pvt->uri.scheme = "http";
00417    }
00418 
00419    if (pvt->uri.port == 0) {
00420       pvt->uri.port = ne_uri_defaultport(pvt->uri.scheme);
00421    }
00422 
00423    pvt->session = ne_session_create(pvt->uri.scheme, pvt->uri.host, pvt->uri.port);
00424    ne_redirect_register(pvt->session);
00425    ne_set_server_auth(pvt->session, auth_credentials, pvt);
00426    if (!strcasecmp(pvt->uri.scheme, "https")) {
00427       ne_ssl_trust_default_ca(pvt->session);
00428    }
00429 
00430    cal->tech_pvt = pvt;
00431 
00432    ast_mutex_init(&refreshlock);
00433 
00434    /* Load it the first time */
00435    if (!(pvt->data = fetch_icalendar(pvt))) {
00436       ast_log(LOG_WARNING, "Unable to parse iCalendar '%s'\n", cal->name);
00437    }
00438 
00439    icalendar_update_events(pvt);
00440 
00441    ao2_unlock(cal);
00442 
00443    /* The only writing from another thread will be if unload is true */
00444    for(;;) {
00445       struct timeval tv = ast_tvnow();
00446       struct timespec ts = {0,};
00447 
00448       ts.tv_sec = tv.tv_sec + (60 * pvt->owner->refresh);
00449 
00450       ast_mutex_lock(&refreshlock);
00451       while (!pvt->owner->unloading) {
00452          if (ast_cond_timedwait(&pvt->owner->unload, &refreshlock, &ts) == ETIMEDOUT) {
00453             break;
00454          }
00455       }
00456       ast_mutex_unlock(&refreshlock);
00457 
00458       if (pvt->owner->unloading) {
00459          ast_debug(10, "Skipping refresh since we got a shutdown signal\n");
00460          return NULL;
00461       }
00462 
00463       ast_debug(10, "Refreshing after %d minute timeout\n", pvt->owner->refresh);
00464 
00465       if (!(pvt->data = fetch_icalendar(pvt))) {
00466          ast_log(LOG_WARNING, "Unable to parse iCalendar '%s'\n", pvt->owner->name);
00467          continue;
00468       }
00469 
00470       icalendar_update_events(pvt);
00471    }
00472 
00473    return NULL;
00474 }

static void icalendar_add_event ( icalcomponent *  comp,
struct icaltime_span *  span,
void *  data 
) [static]

Definition at line 185 of file res_calendar_icalendar.c.

References ao2_link, AST_CALENDAR_BS_BUSY, AST_CALENDAR_BS_FREE, ast_calendar_event_alloc(), ast_calendar_unref_event(), ast_calloc, AST_LIST_INSERT_TAIL, ast_log(), ast_strdup, ast_string_field_set, ast_strlen_zero(), ast_calendar_event::attendees, ast_calendar_attendee::data, ast_calendar_event::end, icalendar_pvt::events, icalfloat_to_timet(), LOG_ERROR, LOG_WARNING, ast_calendar_attendee::next, icalendar_pvt::owner, ast_calendar_event::start, and ast_calendar_event::summary.

Referenced by icalendar_update_events().

00186 {
00187    struct icalendar_pvt *pvt = data;
00188    struct ast_calendar_event *event;
00189    icaltimezone *utc = icaltimezone_get_utc_timezone();
00190    icaltimetype start, end, tmp;
00191    icalcomponent *valarm;
00192    icalproperty *prop;
00193    struct icaltriggertype trigger;
00194 
00195    if (!(pvt && pvt->owner)) {
00196       ast_log(LOG_ERROR, "Require a private structure with an ownenr\n");
00197       return;
00198    }
00199 
00200    if (!(event = ast_calendar_event_alloc(pvt->owner))) {
00201       ast_log(LOG_ERROR, "Could not allocate an event!\n");
00202       return;
00203    }
00204 
00205    start = icalcomponent_get_dtstart(comp);
00206    end = icalcomponent_get_dtend(comp);
00207 
00208    event->start = icaltime_get_tzid(start) ? span->start : icalfloat_to_timet(start);
00209    event->end = icaltime_get_tzid(end) ? span->end : icalfloat_to_timet(end);
00210    event->busy_state = span->is_busy ? AST_CALENDAR_BS_BUSY : AST_CALENDAR_BS_FREE;
00211 
00212    if ((prop = icalcomponent_get_first_property(comp, ICAL_SUMMARY_PROPERTY))) {
00213       ast_string_field_set(event, summary, icalproperty_get_value_as_string(prop));
00214    }
00215 
00216    if ((prop = icalcomponent_get_first_property(comp, ICAL_DESCRIPTION_PROPERTY))) {
00217       ast_string_field_set(event, description, icalproperty_get_value_as_string(prop));
00218    }
00219 
00220    if ((prop = icalcomponent_get_first_property(comp, ICAL_ORGANIZER_PROPERTY))) {
00221       ast_string_field_set(event, organizer, icalproperty_get_value_as_string(prop));
00222    }
00223 
00224    if ((prop = icalcomponent_get_first_property(comp, ICAL_LOCATION_PROPERTY))) {
00225       ast_string_field_set(event, location, icalproperty_get_value_as_string(prop));
00226    }
00227 
00228    if ((prop = icalcomponent_get_first_property(comp, ICAL_CATEGORIES_PROPERTY))) {
00229       ast_string_field_set(event, categories, icalproperty_get_value_as_string(prop));
00230    }
00231 
00232    if ((prop = icalcomponent_get_first_property(comp, ICAL_PRIORITY_PROPERTY))) {
00233       event->priority = icalvalue_get_integer(icalproperty_get_value(prop));
00234    }
00235 
00236    if ((prop = icalcomponent_get_first_property(comp, ICAL_UID_PROPERTY))) {
00237       ast_string_field_set(event, uid, icalproperty_get_value_as_string(prop));
00238    } else {
00239       ast_log(LOG_WARNING, "No UID found, but one is required. Generating, but updates may not be acurate\n");
00240       if (!ast_strlen_zero(event->summary)) {
00241          ast_string_field_set(event, uid, event->summary);
00242       } else {
00243          char tmp[100];
00244          snprintf(tmp, sizeof(tmp), "%lu", event->start);
00245          ast_string_field_set(event, uid, tmp);
00246       }
00247    }
00248 
00249    /* Get the attendees */
00250    for (prop = icalcomponent_get_first_property(comp, ICAL_ATTENDEE_PROPERTY);
00251          prop; prop = icalcomponent_get_next_property(comp, ICAL_ATTENDEE_PROPERTY)) {
00252       struct ast_calendar_attendee *attendee;
00253       const char *data;
00254 
00255       if (!(attendee = ast_calloc(1, sizeof(*attendee)))) {
00256          event = ast_calendar_unref_event(event);
00257          return;
00258       }
00259       data = icalproperty_get_attendee(prop);
00260       if (!ast_strlen_zero(data)) {
00261          attendee->data = ast_strdup(data);;
00262          AST_LIST_INSERT_TAIL(&event->attendees, attendee, next);
00263       }
00264    }
00265 
00266 
00267    /* Only set values for alarm based on VALARM.  Can be overriden in main/calendar.c by autoreminder
00268     * therefore, go ahead and add events even if their is no VALARM or it is malformed
00269     * Currently we are only getting the first VALARM and are handling repitition in main/calendar.c from calendar.conf */
00270    if (!(valarm = icalcomponent_get_first_component(comp, ICAL_VALARM_COMPONENT))) {
00271       ao2_link(pvt->events, event);
00272       event = ast_calendar_unref_event(event);
00273       return;
00274    }
00275 
00276    if (!(prop = icalcomponent_get_first_property(valarm, ICAL_TRIGGER_PROPERTY))) {
00277       ast_log(LOG_WARNING, "VALARM has no TRIGGER, skipping!\n");
00278       ao2_link(pvt->events, event);
00279       event = ast_calendar_unref_event(event);
00280       return;
00281    }
00282 
00283    trigger = icalproperty_get_trigger(prop);
00284 
00285    if (icaltriggertype_is_null_trigger(trigger)) {
00286       ast_log(LOG_WARNING, "Bad TRIGGER for VALARM, skipping!\n");
00287       ao2_link(pvt->events, event);
00288       event = ast_calendar_unref_event(event);
00289       return;
00290    }
00291 
00292    if (!icaltime_is_null_time(trigger.time)) { /* This is an absolute time */
00293       tmp = icaltime_convert_to_zone(trigger.time, utc);
00294       event->alarm = icaltime_as_timet_with_zone(tmp, utc);
00295    } else { /* Offset from either dtstart or dtend */
00296       /* XXX Technically you can check RELATED to see if the event fires from the END of the event
00297        * But, I'm not sure I've ever seen anyone implement it in calendaring software, so I'm ignoring for now */
00298       tmp = icaltime_add(start, trigger.duration);
00299       event->alarm = icaltime_as_timet_with_zone(tmp, utc);
00300    }
00301 
00302    ao2_link(pvt->events, event);
00303    event = ast_calendar_unref_event(event);
00304 
00305    return;
00306 }

static void icalendar_destructor ( void *  obj  )  [static]

Definition at line 68 of file res_calendar_icalendar.c.

References ao2_callback, ao2_ref, ast_debug, ast_string_field_free_memory, icalendar_pvt::data, icalendar_pvt::events, ast_calendar::name, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, icalendar_pvt::owner, and icalendar_pvt::session.

Referenced by ical_load_calendar().

00069 {
00070    struct icalendar_pvt *pvt = obj;
00071 
00072    ast_debug(1, "Destroying pvt for iCalendar %s\n", pvt->owner->name);
00073    if (pvt->session) {
00074       ne_session_destroy(pvt->session);
00075    }
00076    if (pvt->data) {
00077       icalcomponent_free(pvt->data);
00078    }
00079    ast_string_field_free_memory(pvt);
00080 
00081    ao2_callback(pvt->events, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
00082 
00083    ao2_ref(pvt->events, -1);
00084 }

static void icalendar_update_events ( struct icalendar_pvt *  pvt  )  [static]

Definition at line 308 of file res_calendar_icalendar.c.

References ast_calendar_merge_events(), ast_log(), icalendar_pvt::data, icalendar_pvt::events, icalendar_add_event(), LOG_ERROR, icalendar_pvt::owner, and ast_calendar::timeframe.

Referenced by ical_load_calendar().

00309 {
00310    struct icaltimetype start_time, end_time;
00311    icalcomponent *iter;
00312 
00313    if (!pvt) {
00314       ast_log(LOG_ERROR, "iCalendar is NULL\n");
00315       return;
00316    }
00317 
00318    if (!pvt->owner) {
00319       ast_log(LOG_ERROR, "iCalendar is an orphan!\n");
00320       return;
00321    }
00322 
00323    if (!pvt->data) {
00324       ast_log(LOG_ERROR, "The iCalendar has not been parsed!\n");
00325       return;
00326    }
00327 
00328    start_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());
00329    end_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());
00330    end_time.second += pvt->owner->timeframe * 60;
00331    icaltime_normalize(end_time);
00332 
00333    for (iter = icalcomponent_get_first_component(pvt->data, ICAL_VEVENT_COMPONENT);
00334         iter;
00335        iter = icalcomponent_get_next_component(pvt->data, ICAL_VEVENT_COMPONENT))
00336    {
00337       icalcomponent_foreach_recurrence(iter, start_time, end_time, icalendar_add_event, pvt);
00338    }
00339 
00340    ast_calendar_merge_events(pvt->owner, pvt->events);
00341 }

static time_t icalfloat_to_timet ( icaltimetype  time  )  [static]

Definition at line 159 of file res_calendar_icalendar.c.

References ast_mktime(), ast_tm::tm_hour, ast_tm::tm_isdst, ast_tm::tm_mday, ast_tm::tm_min, ast_tm::tm_mon, ast_tm::tm_sec, and ast_tm::tm_year.

Referenced by icalendar_add_event().

00160 {
00161    struct ast_tm tm = {0,};
00162    struct timeval tv;
00163 
00164    tm.tm_mday = time.day;
00165    tm.tm_mon = time.month - 1;
00166    tm.tm_year = time.year - 1900;
00167    tm.tm_hour = time.hour;
00168    tm.tm_min = time.minute;
00169    tm.tm_sec = time.second;
00170    tm.tm_isdst = -1;
00171    tv = ast_mktime(&tm, NULL);
00172 
00173    return tv.tv_sec;
00174 }

static int load_module ( void   )  [static]

Definition at line 476 of file res_calendar_icalendar.c.

References ast_calendar_register(), AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.

00477 {
00478    ne_sock_init();
00479    if (ast_calendar_register(&ical_tech)) {
00480       ne_sock_exit();
00481       return AST_MODULE_LOAD_DECLINE;
00482    }
00483 
00484    return AST_MODULE_LOAD_SUCCESS;
00485 }

static int unload_module ( void   )  [static]

Definition at line 487 of file res_calendar_icalendar.c.

References ast_calendar_unregister().

00488 {
00489    ast_calendar_unregister(&ical_tech);
00490    ne_sock_exit();
00491    return 0;
00492 }

static void * unref_icalendar ( void *  obj  )  [static]

Definition at line 86 of file res_calendar_icalendar.c.

References ao2_ref.

Referenced by ical_load_calendar().

00087 {
00088    struct icalendar_pvt *pvt = obj;
00089 
00090    ao2_ref(pvt, -1);
00091    return NULL;
00092 }


Variable Documentation

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk iCalendar .ics file integration" , .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_DEVSTATE_PLUGIN, } [static]

Definition at line 498 of file res_calendar_icalendar.c.

Definition at line 498 of file res_calendar_icalendar.c.

struct ast_calendar_tech ical_tech [static]

Definition at line 47 of file res_calendar_icalendar.c.


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