/*
* FACILITY Advice-On-Charge handler
*/
-#ifdef HAVE_LIBPRI_AOC
+#if defined(HAVE_LIBPRI_AOC) && defined(PRI_EVENT_FACILITY)
static const char *aoc_billing_id(const int id)
{
switch (id) {
}
#endif
+#ifdef PRI_EVENT_FACILITY
/**
* \brief Handler for libpri facility events
* \param spri Pri wrapper structure (libpri, span, dchan)
ftdm_log(FTDM_LOG_DEBUG, "Caught Event on span %d %u (%s)\n", ftdm_span_get_id(spri->span), event_type, lpwrap_pri_event_str(event_type));
return 0;
}
+#endif
/**
* \brief Handler for libpri dchan up event
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_RESTART, on_restart);
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_RESTART_ACK, on_restart_ack);
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_IO_FAIL, on_io_fail);
+#ifdef PRI_EVENT_FACILITY
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_FACILITY, on_facility);
+#endif
/* Callback invoked on each iteration of the lpwrap_run_pri() event loop */
isdn_data->spri.on_loop = check_flags;