172#define AST_AOC_ENCODED_TYPE_REQUEST (0 << 0)
173#define AST_AOC_ENCODED_TYPE_D (1 << 0)
174#define AST_AOC_ENCODED_TYPE_E (2 << 0)
175#define AST_AOC_ENCODED_TYPE_S (3 << 0)
177#define AST_AOC_ENCODED_REQUEST_S (1 << 2)
178#define AST_AOC_ENCODED_REQUEST_D (1 << 3)
179#define AST_AOC_ENCODED_REQUEST_E (1 << 4)
181#define AST_AOC_ENCODED_CHARGE_NA (0 << 5)
182#define AST_AOC_ENCODED_CHARGE_FREE (1 << 5)
183#define AST_AOC_ENCODED_CHARGE_CURRENCY (2 << 5)
184#define AST_AOC_ENCODED_CHARGE_UNIT (3 << 5)
186#define AST_AOC_ENCODED_CHARGE_SUBTOTAL (1 << 7)
187#define AST_AOC_ENCODED_CHARGE_TOTAL (0 << 7)
189#define AST_AOC_ENCODE_VERSION 1
249} __attribute__((packed));
255} __attribute__((packed));
262} __attribute__((packed));
266} __attribute__((packed));
270} __attribute__((packed));
274} __attribute__((packed));
326 switch (
entry.rate_type) {
339 sizeof(
entry.rate.duration.currency_name));
348 sizeof(
entry.rate.flat.currency_name));
358 sizeof(
entry.rate.volume.currency_name));
374 while (datalen >= 2) {
377 if (
len > datalen -2) {
378 ast_log(
LOG_ERROR,
"AOC information element length exceeds the total message size\n");
386 memcpy(&ie, data + 2,
len);
397 memcpy(&ie, data + 2,
len);
406 memcpy(&ie, data + 2,
len);
426 memcpy(&ie, data + 2,
len);
443 datalen -= (
len + 2);
524 if (datalen > ((
int)
sizeof(ied->
buf) - ied->
pos)) {
528 ied->
buf[ied->
pos++] = ie_id;
529 ied->
buf[ied->
pos++] = datalen;
531 memcpy(ied->
buf + ied->
pos, data, datalen);
542 switch (
entry->rate_type) {
554 entry->rate.duration.currency_name,
563 entry->rate.flat.currency_name,
573 entry->rate.volume.currency_name,
622 memset(&ie, 0,
sizeof(ie));
639 memset(&ie, 0,
sizeof(ie));
656 if (!decoded || !out_size) {
670 ast_log(
LOG_WARNING,
"Failed to create ast_aoc_encoded object during decode routine. \n");
774 const char *currency_name,
777 unsigned long granularity_time,
786 entry.rate.duration.amount = amount;
787 entry.rate.duration.multiplier = multiplier;
788 entry.rate.duration.time = time;
789 entry.rate.duration.time_scale = time_scale;
790 entry.rate.duration.granularity_time = granularity_time;
791 entry.rate.duration.granularity_time_scale = granularity_time_scale;
792 entry.rate.duration.charging_type = step_function ? 1 : 0;
805 const char *currency_name)
811 entry.rate.flat.amount = amount;
812 entry.rate.flat.multiplier = multiplier;
827 const char *currency_name)
833 entry.rate.volume.multiplier = multiplier;
834 entry.rate.volume.amount = amount;
835 entry.rate.volume.volume_unit = volume_unit;
852 entry.rate.special_code = code;
887 entry.rate.special_code = code;
920 const unsigned int amount,
978 const unsigned int amount_is_present,
979 const unsigned int amount,
980 const unsigned int type_is_present,
981 const unsigned int type)
988 if (!amount_is_present && !type_is_present) {
993 if (amount_is_present) {
1000 if (type_is_present) {
1128 str =
"NotAvailable";
1131 str =
"SpecialArrangement";
1134 str =
"BasicCommunication";
1137 str =
"CallAttempt";
1143 str =
"UserUserInfo";
1146 str =
"SupplementaryService";
1193 str =
"NotAvailable";
1199 str =
"FreeFromBeginning";
1211 str =
"SpecialCode";
1233 str =
"OneHundredthSecond";
1236 str =
"OneTenthSecond";
1264 str =
"NotAvailable";
1305 switch (billing_id) {
1311 return "CreditCard";
1313 return "CallForwardingUnconditional";
1315 return "CallForwardingBusy";
1317 return "CallForwardingNoReply";
1319 return "CallDeflection";
1321 return "CallTransfer";
1323 return "NotAvailable";
1327 return "NotAvailable";
1361 "Usage: 'aoc set debug on' to enable aoc debug, 'aoc set debug off' to disable debug.\n";
1369 ast_cli(
a->fd,
"aoc debug enabled\n");
1372 ast_cli(
a->fd,
"aoc debug disabled\n");
1412 static const char name[] =
"Amount";
1441 const char *rate_str;
1446 for (idx = 0; idx < decoded->
aoc_s_count; ++idx) {
1459 strcat(
prefix, rate_str);
1467 "StepFunction" :
"ContinuousCharging");
1479 strcat(
prefix, rate_str);
1488 strcat(
prefix, rate_str);
1509 const char *charge_str;
1539 for (idx = 0; idx < decoded->
unit_count; ++idx) {
1540 snprintf(
prefix,
sizeof(
prefix),
"%s/Item(%d)", charge_str, idx);
1558 const char *charge_str;
1562 charge_str =
"ChargingAssociation";
1566 snprintf(
prefix,
sizeof(
prefix),
"%s/Number", charge_str);
1602 for (idx = 0; idx < decoded->
unit_count; ++idx) {
1603 snprintf(
prefix,
sizeof(
prefix),
"%s/Item(%d)", charge_str, idx);
1663 const char *obj_type;
1672 obj_type =
"Currency";
1748 "Currency", currency,
1750 ?
"StepFunction" :
"ContinuousCharging",
1773 "Currency", currency);
1784 "Chargeable", charge_item,
1866 const char *event_name)
1956 if (!decoded || !msg) {
Prototypes for public functions only of internal interest,.
#define AST_AOC_ENCODED_CHARGE_UNIT
int ast_aoc_cli_init(void)
enable aoc cli options
static int aoc_parse_ie(struct ast_aoc_decoded *decoded, unsigned char *data, unsigned int datalen)
#define AST_AOC_ENCODED_TYPE_D
AOC_IE
AOC Payload Information Elements.
@ AOC_IE_TERMINATION_REQUEST
@ AOC_IE_CHARGING_ASSOCIATION
int ast_aoc_decoded2str(const struct ast_aoc_decoded *decoded, struct ast_str **msg)
Convert decoded aoc msg to string representation.
void * ast_aoc_destroy_encoded(struct ast_aoc_encoded *encoded)
free an ast_aoc_encoded object
unsigned int ast_aoc_get_unit_count(struct ast_aoc_decoded *decoded)
get the number of unit entries for AOC-D and AOC-E messages
int ast_aoc_s_add_rate_duration(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item, unsigned int amount, enum ast_aoc_currency_multiplier multiplier, const char *currency_name, unsigned long time, enum ast_aoc_time_scale time_scale, unsigned long granularity_time, enum ast_aoc_time_scale granularity_time_scale, int step_function)
Add AOC-S duration rate entry.
#define AST_AOC_ENCODED_CHARGE_NA
static struct ast_manager_event_blob * aoc_e_to_ami(struct stasis_message *message)
enum ast_aoc_total_type ast_aoc_get_total_type(struct ast_aoc_decoded *decoded)
get the type of total for a AOC-D message
const char * ast_aoc_get_currency_name(struct ast_aoc_decoded *decoded)
get the currency name for AOC-D and AOC-E messages
struct stasis_message_type * aoc_s_type(void)
static const char * aoc_charged_item_str(enum ast_aoc_s_charged_item value)
static void aoc_create_ie_data_charging_rate(const struct ast_aoc_s_entry *entry, struct aoc_ie_charging_rate *ie)
enum ast_aoc_type ast_aoc_get_msg_type(struct ast_aoc_decoded *decoded)
get the message type, AOC-D, AOC-E, or AOC Request
static struct ast_json * s_to_json(const struct ast_aoc_decoded *decoded)
int ast_aoc_test_encode_decode_match(struct ast_aoc_decoded *decoded)
test aoc encode decode routines.
int ast_aoc_s_add_rate_special_charge_code(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item, unsigned int code)
Add AOC-S special rate entry.
static void aoc_shutdown(void)
int ast_aoc_get_termination_request(struct ast_aoc_decoded *decoded)
get whether or not the AST_AOC_REQUEST message as a termination request.
static struct ast_json * association_to_json(const struct ast_aoc_decoded *decoded)
static void aoc_event_blob_dtor(void *obj)
static void aoc_e_event(const struct ast_aoc_decoded *decoded, struct ast_str **msg)
static const char * aoc_charge_type_str(enum ast_aoc_charge_type value)
struct ast_aoc_decoded * ast_aoc_decode(struct ast_aoc_encoded *encoded, size_t size, struct ast_channel *chan)
decodes an encoded aoc payload.
struct ast_aoc_decoded * ast_aoc_create(const enum ast_aoc_type msg_type, const enum ast_aoc_charge_type charge_type, const enum ast_aoc_request requests)
creates a ast_aoc_decode object of a specific message type
static const char * aoc_scale_str(enum ast_aoc_time_scale value)
static struct ast_json * charge_to_json(const struct ast_aoc_decoded *decoded)
void * ast_aoc_destroy_decoded(struct ast_aoc_decoded *decoded)
free an ast_aoc_decoded object
static struct ast_json * units_to_json(const struct ast_aoc_decoded *decoded)
static struct ast_manager_event_blob * aoc_d_to_ami(struct stasis_message *message)
static struct ast_json * d_to_json(const struct ast_aoc_decoded *decoded)
int ast_aoc_set_association_number(struct ast_aoc_decoded *decoded, const char *num, uint8_t plan)
set the charging association number for an AOC-E message
#define AST_AOC_ENCODE_VERSION
#define AST_AOC_ENCODED_TYPE_REQUEST
static struct ast_cli_entry aoc_cli[]
int ast_aoc_add_unit_entry(struct ast_aoc_decoded *decoded, const unsigned int amount_is_present, const unsigned int amount, const unsigned int type_is_present, const unsigned int type)
Adds a unit entry into the list of units.
const char * ast_aoc_get_currency_multiplier_decimal(struct ast_aoc_decoded *decoded)
get the currency multiplier for AOC-D and AOC-E messages in decimal format
int ast_aoc_s_add_rate_free(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item, int from_beginning)
Add AOC-S indicating charge item is free.
const struct ast_aoc_unit_entry * ast_aoc_get_unit_info(struct ast_aoc_decoded *decoded, unsigned int entry_number)
get a specific unit entry.
STASIS_MESSAGE_TYPE_DEFN(aoc_s_type,.to_ami=aoc_s_to_ami)
static struct ast_manager_event_blob * aoc_to_ami(struct stasis_message *message, const char *event_name)
enum ast_aoc_request ast_aoc_get_request(struct ast_aoc_decoded *decoded)
get the types of AOC requested for when message type is AOC Request
int ast_aoc_set_billing_id(struct ast_aoc_decoded *decoded, const enum ast_aoc_billing_id id)
set the billing id for a AOC-D or AST_AOC_E message
int ast_aoc_s_add_special_arrangement(struct ast_aoc_decoded *decoded, unsigned int code)
Add AOC-S special arrangement entry.
int ast_aoc_set_currency_info(struct ast_aoc_decoded *decoded, const unsigned int amount, const enum ast_aoc_currency_multiplier multiplier, const char *name)
Sets the currency values for a AOC-D or AOC-E message.
#define AST_AOC_ENCODED_CHARGE_CURRENCY
static void aoc_request_event(const struct ast_aoc_decoded *decoded, struct ast_str **msg)
int ast_aoc_set_association_id(struct ast_aoc_decoded *decoded, const int id)
set the charging association id for an AST_AOC_E message
int ast_aoc_s_add_rate_flat(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item, unsigned int amount, enum ast_aoc_currency_multiplier multiplier, const char *currency_name)
Add AOC-S flat rate entry.
struct ast_aoc_encoded * ast_aoc_encode(struct ast_aoc_decoded *decoded, size_t *out_size, struct ast_channel *chan)
encodes a decoded aoc structure so it can be passed on the wire
static void aoc_s_event(const struct ast_aoc_decoded *decoded, struct ast_str **msg)
static int aoc_s_add_entry(struct ast_aoc_decoded *decoded, struct ast_aoc_s_entry *entry)
#define AST_AOC_ENCODED_REQUEST_E
static const char * aoc_multiplier_str(enum ast_aoc_currency_multiplier mult)
static struct ast_json * currency_to_json(const char *name, int cost, enum ast_aoc_currency_multiplier mult)
static void aoc_publish_blob(struct ast_channel *chan, struct stasis_message_type *msg_type, struct ast_json *blob)
int ast_aoc_set_total_type(struct ast_aoc_decoded *decoded, const enum ast_aoc_total_type type)
Sets the type of total for a AOC-D message.
int ast_aoc_s_add_rate_volume(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item, enum ast_aoc_volume_unit volume_unit, unsigned int amount, enum ast_aoc_currency_multiplier multiplier, const char *currency_name)
Add AOC-S volume rate entry.
#define AST_AOC_ENCODED_REQUEST_D
static char * aoc_cli_debug_enable(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static void aoc_d_event(const struct ast_aoc_decoded *decoded, struct ast_str **msg)
enum ast_aoc_billing_id ast_aoc_get_billing_id(struct ast_aoc_decoded *decoded)
get the billing id for AOC-D and AOC-E messages
struct stasis_message_type * aoc_d_type(void)
const struct ast_aoc_charging_association * ast_aoc_get_association_info(struct ast_aoc_decoded *decoded)
get the charging association info for AOC-E messages
unsigned int ast_aoc_s_get_count(struct ast_aoc_decoded *decoded)
get the number rates associated with an AOC-S message
static const char * aoc_type_of_totaling_str(enum ast_aoc_total_type value)
enum ast_aoc_currency_multiplier ast_aoc_get_currency_multiplier(struct ast_aoc_decoded *decoded)
get the currency multiplier for AOC-D and AOC-E messages
static const char * aoc_volume_unit_str(enum ast_aoc_volume_unit value)
static char aoc_debug_enabled
static void aoc_time_str(struct ast_str **msg, const char *prefix, const char *name, unsigned long time, enum ast_aoc_time_scale scale)
const struct ast_aoc_s_entry * ast_aoc_s_get_rate_info(struct ast_aoc_decoded *decoded, unsigned int entry_number)
get a specific AOC-S rate entry.
static void aoc_display_decoded_debug(const struct ast_aoc_decoded *decoded, int decoding, struct ast_channel *chan)
static const char * aoc_billingid_str(enum ast_aoc_billing_id billing_id)
static const char * aoc_rate_type_str(enum ast_aoc_s_rate_type value)
int ast_aoc_manager_event(const struct ast_aoc_decoded *decoded, struct ast_channel *chan)
generate AOC manager event for an AOC-S, AOC-D, or AOC-E msg
struct stasis_message_type * aoc_e_type(void)
#define AST_AOC_ENCODED_TYPE_S
static void aoc_create_ie_data(struct ast_aoc_decoded *decoded, struct aoc_ie_data *ied)
int ast_aoc_set_termination_request(struct ast_aoc_decoded *decoded)
Mark the AST_AOC_REQUEST message as a termination request.
enum ast_aoc_charge_type ast_aoc_get_charge_type(struct ast_aoc_decoded *decoded)
get the charging type for an AOC-D or AOC-E message
int ast_aoc_s_add_rate_na(struct ast_aoc_decoded *decoded, enum ast_aoc_s_charged_item charged_item)
Add AOC-S entry indicating charge item is not available.
unsigned int ast_aoc_get_currency_amount(struct ast_aoc_decoded *decoded)
get the currency amount for AOC-D and AOC-E messages
static void aoc_amount_str(struct ast_str **msg, const char *prefix, unsigned int amount, enum ast_aoc_currency_multiplier mult)
#define AST_AOC_ENCODED_CHARGE_SUBTOTAL
#define AST_AOC_ENCODED_CHARGE_FREE
#define AST_AOC_ENCODED_REQUEST_S
#define AST_AOC_ENCODED_TYPE_E
static struct ast_json * e_to_json(const struct ast_aoc_decoded *decoded)
static struct ast_manager_event_blob * aoc_s_to_ami(struct stasis_message *message)
static void aoc_parse_ie_charging_rate(struct ast_aoc_decoded *decoded, const struct aoc_ie_charging_rate *ie)
static int aoc_append_ie(struct aoc_ie_data *ied, unsigned short ie_id, const void *data, unsigned short datalen)
Generic Advice of Charge encode and decode routines.
@ AST_AOC_CHARGED_ITEM_BASIC_COMMUNICATION
@ AST_AOC_CHARGED_ITEM_SPECIAL_ARRANGEMENT
@ AST_AOC_CHARGED_ITEM_NA
@ AST_AOC_CHARGED_ITEM_USER_USER_INFO
@ AST_AOC_CHARGED_ITEM_CALL_SETUP
@ AST_AOC_CHARGED_ITEM_SUPPLEMENTARY_SERVICE
@ AST_AOC_CHARGED_ITEM_CALL_ATTEMPT
@ AST_AOC_CHARGE_CURRENCY
@ AST_AOC_TIME_SCALE_TEN_SECOND
@ AST_AOC_TIME_SCALE_TENTH_SECOND
@ AST_AOC_TIME_SCALE_MINUTE
@ AST_AOC_TIME_SCALE_SECOND
@ AST_AOC_TIME_SCALE_HOUR
@ AST_AOC_TIME_SCALE_HUNDREDTH_SECOND
@ AST_AOC_VOLUME_UNIT_OCTET
@ AST_AOC_VOLUME_UNIT_SEGMENT
@ AST_AOC_VOLUME_UNIT_MESSAGE
#define AOC_CURRENCY_NAME_SIZE
ast_aoc_currency_multiplier
Defines the currency multiplier for an aoc message.
@ AST_AOC_MULT_ONEHUNDREDTH
@ AST_AOC_MULT_NUM_ENTRIES
@ AST_AOC_MULT_ONETHOUSANDTH
@ AST_AOC_CHARGING_ASSOCIATION_NA
@ AST_AOC_CHARGING_ASSOCIATION_ID
@ AST_AOC_CHARGING_ASSOCIATION_NUMBER
ast_aoc_billing_id
Defines the billing id options for an aoc message.
@ AST_AOC_BILLING_NUM_ENTRIES
@ AST_AOC_BILLING_CALL_FWD_BUSY
@ AST_AOC_BILLING_CALL_FWD_NO_REPLY
@ AST_AOC_BILLING_CALL_DEFLECTION
@ AST_AOC_BILLING_CREDIT_CARD
@ AST_AOC_BILLING_CALL_TRANSFER
@ AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL
@ AST_AOC_BILLING_REVERSE_CHARGE
@ AST_AOC_RATE_TYPE_VOLUME
@ AST_AOC_RATE_TYPE_FREE_FROM_BEGINNING
@ AST_AOC_RATE_TYPE_SPECIAL_CODE
@ AST_AOC_RATE_TYPE_DURATION
Asterisk main include file. File version handling, generic pbx functions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
#define ast_calloc(num, len)
A wrapper for calloc()
@ AO2_ALLOC_OPT_LOCK_NOLOCK
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_alloc_options(data_size, destructor_fn, options)
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
const char * ast_channel_name(const struct ast_channel *chan)
#define ast_channel_lock(chan)
struct ast_channel_snapshot * ast_channel_snapshot(const struct ast_channel *chan)
#define ast_channel_unlock(chan)
Standard Command Line Interface.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_CLI_DEFINE(fn, txt,...)
void ast_cli(int fd, const char *fmt,...)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
struct stasis_topic * ast_manager_get_topic(void)
Get the Stasis Message Bus API topic for AMI.
struct ast_str * ast_manager_str_from_json_object(struct ast_json *blob, key_exclusion_cb exclusion_cb)
Convert a JSON object into an AMI compatible string.
static char prefix[MAX_PREFIX]
#define ast_verb(level,...)
struct ast_json * ast_json_null(void)
Get the JSON null value.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
struct ast_json * ast_json_object_create(void)
Create a new JSON object.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
struct ast_json * ast_json_stringf(const char *format,...)
Create a JSON string, printf style.
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
int ast_json_object_set(struct ast_json *object, const char *key, struct ast_json *value)
Set a field in a JSON object.
#define AST_JSON_UTF8_VALIDATE(str)
Check str for UTF-8 and replace with an empty string if fails the check.
AST_JSON_INT_T ast_json_int_t
Primarily used to cast when packing to an "I" type.
int ast_json_is_null(const struct ast_json *value)
Check if value is JSON null.
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
struct ast_str * ast_manager_build_channel_state_string(const struct ast_channel_snapshot *snapshot)
Generate the AMI message body from a channel snapshot.
struct ast_manager_event_blob * ast_manager_event_blob_create(int event_flags, const char *manager_event, const char *extra_fields_fmt,...)
Construct a ast_manager_event_blob.
static struct requests requests
static void to_ami(struct ast_sip_subscription *sub, struct ast_str **buf)
#define STASIS_MESSAGE_TYPE_CLEANUP(name)
Boiler-plate messaging macro for cleaning up message types.
#define STASIS_MESSAGE_TYPE_INIT(name)
Boiler-plate messaging macro for initializing message types.
void * stasis_message_data(const struct stasis_message *msg)
Get the data contained in a message.
struct stasis_message * stasis_message_create(struct stasis_message_type *type, void *data)
Create a new message.
void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
Publish a message to a topic's subscribers.
String manipulation functions.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true"....
static force_inline int attribute_pure ast_strlen_zero(const char *s)
int attribute_pure ast_false(const char *val)
Make sure something is false. Determine if a string containing a boolean value is "false"....
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
struct ast_channel_snapshot * snapshot
struct ast_aoc_charging_association ca
struct ast_aoc_s_entry entry
char name[AOC_CURRENCY_NAME_SIZE]
union ast_aoc_charging_association::@183 charge
struct ast_aoc_charging_association_number number
enum ast_aoc_currency_multiplier multiplier
unsigned int currency_amount
struct ast_aoc_unit_entry unit_list[32]
char currency_name[AOC_CURRENCY_NAME_SIZE]
enum ast_aoc_billing_id billing_id
struct ast_aoc_s_entry aoc_s_entries[10]
struct ast_aoc_charging_association charging_association
enum ast_aoc_request request_flag
enum ast_aoc_total_type total_type
enum ast_aoc_charge_type charge_type
enum ast_aoc_type msg_type
char currency_name[AOC_CURRENCY_NAME_SIZE]
uint16_t granularity_time_scale
uint8_t charging_type
Charging interval type.
uint32_t granularity_time
char currency_name[AOC_CURRENCY_NAME_SIZE]
struct ast_aoc_flat_rate flat
union ast_aoc_s_entry::@182 rate
Charge rate being applied.
struct ast_aoc_volume_rate volume
struct ast_aoc_duration_rate duration
char currency_name[AOC_CURRENCY_NAME_SIZE]
Structure representing a snapshot of channel state.
Main Channel structure associated with a channel.
descriptor for a cli entry.
Abstract JSON element (object, array, string, int, ...).
Struct containing info for an AMI event to send out.
Support for dynamic strings.