123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491 |
- /*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2013, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
- /*! \file
- *
- * \brief Generated file - Build validators for ARI model objects.
- *
- * In addition to the normal validation functions one would normally expect,
- * each validator has a ast_ari_validate_{id}_fn() companion function that returns
- * the validator's function pointer.
- *
- * The reason for this seamingly useless indirection is the way function
- * pointers interfere with module loading. Asterisk attempts to dlopen() each
- * module using \c RTLD_LAZY in order to read some metadata from the module.
- * Unfortunately, if you take the address of a function, the function has to be
- * resolvable at load time, even if \c RTLD_LAZY is specified. By moving the
- * function-address-taking into this module, we can once again be lazy.
- */
- /*
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * !!!!! DO NOT EDIT !!!!!
- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * This file is generated by a mustache template. Please see the original
- * template in rest-api-templates/ari_model_validators.h.mustache
- */
- #ifndef _ASTERISK_ARI_MODEL_H
- #define _ASTERISK_ARI_MODEL_H
- #include "asterisk/json.h"
- /*! @{ */
- /*!
- * \brief Validator for native Swagger void.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_void(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger object.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_object(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger byte.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_byte(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger boolean.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_boolean(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger int.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_int(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger long.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_long(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger float.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_float(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger double.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_double(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger string.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_string(struct ast_json *json);
- /*!
- * \brief Validator for native Swagger date.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_date(struct ast_json *json);
- /*!
- * \brief Validator for a Swagger List[]/JSON array.
- *
- * \param json JSON object to validate.
- * \param fn Validator to call on every element in the array.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_list(struct ast_json *json, int (*fn)(struct ast_json *));
- /*! @} */
- /*!
- * \brief Function type for validator functions. Allows for
- */
- typedef int (*ari_validator)(struct ast_json *json);
- /*!
- * \brief Validator for AsteriskInfo.
- *
- * Asterisk system information
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_asterisk_info(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_asterisk_info().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_asterisk_info_fn(void);
- /*!
- * \brief Validator for BuildInfo.
- *
- * Info about how Asterisk was built
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_build_info(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_build_info().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_build_info_fn(void);
- /*!
- * \brief Validator for ConfigInfo.
- *
- * Info about Asterisk configuration
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_config_info(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_config_info().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_config_info_fn(void);
- /*!
- * \brief Validator for SetId.
- *
- * Effective user/group id
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_set_id(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_set_id().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_set_id_fn(void);
- /*!
- * \brief Validator for StatusInfo.
- *
- * Info about Asterisk status
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_status_info(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_status_info().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_status_info_fn(void);
- /*!
- * \brief Validator for SystemInfo.
- *
- * Info about Asterisk
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_system_info(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_system_info().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_system_info_fn(void);
- /*!
- * \brief Validator for Variable.
- *
- * The value of a channel variable
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_variable(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_variable().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_variable_fn(void);
- /*!
- * \brief Validator for Endpoint.
- *
- * An external device that may offer/accept calls to/from Asterisk.
- *
- * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_endpoint(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_endpoint().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_endpoint_fn(void);
- /*!
- * \brief Validator for TextMessage.
- *
- * A text message.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_text_message(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_text_message().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_text_message_fn(void);
- /*!
- * \brief Validator for TextMessageVariable.
- *
- * A key/value pair variable in a text message.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_text_message_variable(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_text_message_variable().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_text_message_variable_fn(void);
- /*!
- * \brief Validator for CallerID.
- *
- * Caller identification
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_caller_id(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_caller_id().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_caller_id_fn(void);
- /*!
- * \brief Validator for Channel.
- *
- * A specific communication connection between Asterisk and an Endpoint.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_fn(void);
- /*!
- * \brief Validator for Dialed.
- *
- * Dialed channel information.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_dialed(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_dialed().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_dialed_fn(void);
- /*!
- * \brief Validator for DialplanCEP.
- *
- * Dialplan location (context/extension/priority)
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_dialplan_cep(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_dialplan_cep().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_dialplan_cep_fn(void);
- /*!
- * \brief Validator for Bridge.
- *
- * The merging of media from one or more channels.
- *
- * Everyone on the bridge receives the same audio.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_fn(void);
- /*!
- * \brief Validator for LiveRecording.
- *
- * A recording that is in progress
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_live_recording(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_live_recording().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_live_recording_fn(void);
- /*!
- * \brief Validator for StoredRecording.
- *
- * A past recording that may be played back.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_stored_recording(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_stored_recording().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_stored_recording_fn(void);
- /*!
- * \brief Validator for FormatLangPair.
- *
- * Identifies the format and language of a sound file
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_format_lang_pair(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_format_lang_pair().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_format_lang_pair_fn(void);
- /*!
- * \brief Validator for Sound.
- *
- * A media file that may be played back.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_sound(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_sound().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_sound_fn(void);
- /*!
- * \brief Validator for Playback.
- *
- * Object representing the playback of media to a channel
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_playback(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_playback().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_playback_fn(void);
- /*!
- * \brief Validator for DeviceState.
- *
- * Represents the state of a device.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_device_state(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_device_state().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_device_state_fn(void);
- /*!
- * \brief Validator for Mailbox.
- *
- * Represents the state of a mailbox.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_mailbox(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_mailbox().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_mailbox_fn(void);
- /*!
- * \brief Validator for ApplicationReplaced.
- *
- * Notification that another WebSocket has taken over for an application.
- *
- * An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_application_replaced(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_application_replaced().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_application_replaced_fn(void);
- /*!
- * \brief Validator for BridgeAttendedTransfer.
- *
- * Notification that an attended transfer has occurred.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge_attended_transfer(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge_attended_transfer().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_attended_transfer_fn(void);
- /*!
- * \brief Validator for BridgeBlindTransfer.
- *
- * Notification that a blind transfer has occurred.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge_blind_transfer(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge_blind_transfer().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_blind_transfer_fn(void);
- /*!
- * \brief Validator for BridgeCreated.
- *
- * Notification that a bridge has been created.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge_created(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge_created().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_created_fn(void);
- /*!
- * \brief Validator for BridgeDestroyed.
- *
- * Notification that a bridge has been destroyed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge_destroyed(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge_destroyed().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_destroyed_fn(void);
- /*!
- * \brief Validator for BridgeMerged.
- *
- * Notification that one bridge has merged into another.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_bridge_merged(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_bridge_merged().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_bridge_merged_fn(void);
- /*!
- * \brief Validator for ChannelCallerId.
- *
- * Channel changed Caller ID.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_caller_id(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_caller_id().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_caller_id_fn(void);
- /*!
- * \brief Validator for ChannelCreated.
- *
- * Notification that a channel has been created.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_created(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_created().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_created_fn(void);
- /*!
- * \brief Validator for ChannelDestroyed.
- *
- * Notification that a channel has been destroyed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_destroyed(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_destroyed().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_destroyed_fn(void);
- /*!
- * \brief Validator for ChannelDialplan.
- *
- * Channel changed location in the dialplan.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_dialplan(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_dialplan().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_dialplan_fn(void);
- /*!
- * \brief Validator for ChannelDtmfReceived.
- *
- * DTMF received on a channel.
- *
- * This event is sent when the DTMF ends. There is no notification about the start of DTMF
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_dtmf_received(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_dtmf_received().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_dtmf_received_fn(void);
- /*!
- * \brief Validator for ChannelEnteredBridge.
- *
- * Notification that a channel has entered a bridge.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_entered_bridge(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_entered_bridge().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_entered_bridge_fn(void);
- /*!
- * \brief Validator for ChannelHangupRequest.
- *
- * A hangup was requested on the channel.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_hangup_request(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_hangup_request().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_hangup_request_fn(void);
- /*!
- * \brief Validator for ChannelLeftBridge.
- *
- * Notification that a channel has left a bridge.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_left_bridge(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_left_bridge().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_left_bridge_fn(void);
- /*!
- * \brief Validator for ChannelStateChange.
- *
- * Notification of a channel's state change.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_state_change(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_state_change().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_state_change_fn(void);
- /*!
- * \brief Validator for ChannelTalkingFinished.
- *
- * Talking is no longer detected on the channel.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_talking_finished(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_talking_finished().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_talking_finished_fn(void);
- /*!
- * \brief Validator for ChannelTalkingStarted.
- *
- * Talking was detected on the channel.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_talking_started(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_talking_started().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_talking_started_fn(void);
- /*!
- * \brief Validator for ChannelUserevent.
- *
- * User-generated event with additional user-defined fields in the object.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_userevent(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_userevent().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_userevent_fn(void);
- /*!
- * \brief Validator for ChannelVarset.
- *
- * Channel variable changed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_channel_varset(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_channel_varset().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_channel_varset_fn(void);
- /*!
- * \brief Validator for DeviceStateChanged.
- *
- * Notification that a device state has changed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_device_state_changed(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_device_state_changed().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_device_state_changed_fn(void);
- /*!
- * \brief Validator for Dial.
- *
- * Dialing state has changed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_dial(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_dial().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_dial_fn(void);
- /*!
- * \brief Validator for EndpointStateChange.
- *
- * Endpoint state changed.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_endpoint_state_change(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_endpoint_state_change().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_endpoint_state_change_fn(void);
- /*!
- * \brief Validator for Event.
- *
- * Base type for asynchronous events from Asterisk.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_event(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_event().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_event_fn(void);
- /*!
- * \brief Validator for Message.
- *
- * Base type for errors and events
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_message(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_message().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_message_fn(void);
- /*!
- * \brief Validator for MissingParams.
- *
- * Error event sent when required params are missing.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_missing_params(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_missing_params().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_missing_params_fn(void);
- /*!
- * \brief Validator for PlaybackFinished.
- *
- * Event showing the completion of a media playback operation.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_playback_finished(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_playback_finished().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_playback_finished_fn(void);
- /*!
- * \brief Validator for PlaybackStarted.
- *
- * Event showing the start of a media playback operation.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_playback_started(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_playback_started().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_playback_started_fn(void);
- /*!
- * \brief Validator for RecordingFailed.
- *
- * Event showing failure of a recording operation.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_recording_failed(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_recording_failed().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_recording_failed_fn(void);
- /*!
- * \brief Validator for RecordingFinished.
- *
- * Event showing the completion of a recording operation.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_recording_finished(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_recording_finished().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_recording_finished_fn(void);
- /*!
- * \brief Validator for RecordingStarted.
- *
- * Event showing the start of a recording operation.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_recording_started(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_recording_started().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_recording_started_fn(void);
- /*!
- * \brief Validator for StasisEnd.
- *
- * Notification that a channel has left a Stasis application.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_stasis_end(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_stasis_end().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_stasis_end_fn(void);
- /*!
- * \brief Validator for StasisStart.
- *
- * Notification that a channel has entered a Stasis application.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_stasis_start(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_stasis_start().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_stasis_start_fn(void);
- /*!
- * \brief Validator for TextMessageReceived.
- *
- * A text message was received from an endpoint.
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_text_message_received(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_text_message_received().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_text_message_received_fn(void);
- /*!
- * \brief Validator for Application.
- *
- * Details of a Stasis application
- *
- * \param json JSON object to validate.
- * \returns True (non-zero) if valid.
- * \returns False (zero) if invalid.
- */
- int ast_ari_validate_application(struct ast_json *json);
- /*!
- * \brief Function pointer to ast_ari_validate_application().
- *
- * See \ref ast_ari_model_validators.h for more details.
- */
- ari_validator ast_ari_validate_application_fn(void);
- /*
- * JSON models
- *
- * AsteriskInfo
- * - build: BuildInfo
- * - config: ConfigInfo
- * - status: StatusInfo
- * - system: SystemInfo
- * BuildInfo
- * - date: string (required)
- * - kernel: string (required)
- * - machine: string (required)
- * - options: string (required)
- * - os: string (required)
- * - user: string (required)
- * ConfigInfo
- * - default_language: string (required)
- * - max_channels: int
- * - max_load: double
- * - max_open_files: int
- * - name: string (required)
- * - setid: SetId (required)
- * SetId
- * - group: string (required)
- * - user: string (required)
- * StatusInfo
- * - last_reload_time: Date (required)
- * - startup_time: Date (required)
- * SystemInfo
- * - entity_id: string (required)
- * - version: string (required)
- * Variable
- * - value: string (required)
- * Endpoint
- * - channel_ids: List[string] (required)
- * - resource: string (required)
- * - state: string
- * - technology: string (required)
- * TextMessage
- * - body: string (required)
- * - from: string (required)
- * - to: string (required)
- * - variables: List[TextMessageVariable]
- * TextMessageVariable
- * - key: string (required)
- * - value: string (required)
- * CallerID
- * - name: string (required)
- * - number: string (required)
- * Channel
- * - accountcode: string (required)
- * - caller: CallerID (required)
- * - connected: CallerID (required)
- * - creationtime: Date (required)
- * - dialplan: DialplanCEP (required)
- * - id: string (required)
- * - name: string (required)
- * - state: string (required)
- * Dialed
- * DialplanCEP
- * - context: string (required)
- * - exten: string (required)
- * - priority: long (required)
- * Bridge
- * - bridge_class: string (required)
- * - bridge_type: string (required)
- * - channels: List[string] (required)
- * - creator: string (required)
- * - id: string (required)
- * - name: string (required)
- * - technology: string (required)
- * LiveRecording
- * - cause: string
- * - duration: int
- * - format: string (required)
- * - name: string (required)
- * - silence_duration: int
- * - state: string (required)
- * - talking_duration: int
- * - target_uri: string (required)
- * StoredRecording
- * - format: string (required)
- * - name: string (required)
- * FormatLangPair
- * - format: string (required)
- * - language: string (required)
- * Sound
- * - formats: List[FormatLangPair] (required)
- * - id: string (required)
- * - text: string
- * Playback
- * - id: string (required)
- * - language: string
- * - media_uri: string (required)
- * - state: string (required)
- * - target_uri: string (required)
- * DeviceState
- * - name: string (required)
- * - state: string (required)
- * Mailbox
- * - name: string (required)
- * - new_messages: int (required)
- * - old_messages: int (required)
- * ApplicationReplaced
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * BridgeAttendedTransfer
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - destination_application: string
- * - destination_bridge: string
- * - destination_link_first_leg: Channel
- * - destination_link_second_leg: Channel
- * - destination_threeway_bridge: Bridge
- * - destination_threeway_channel: Channel
- * - destination_type: string (required)
- * - is_external: boolean (required)
- * - replace_channel: Channel
- * - result: string (required)
- * - transfer_target: Channel
- * - transferee: Channel
- * - transferer_first_leg: Channel (required)
- * - transferer_first_leg_bridge: Bridge
- * - transferer_second_leg: Channel (required)
- * - transferer_second_leg_bridge: Bridge
- * BridgeBlindTransfer
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge
- * - channel: Channel (required)
- * - context: string (required)
- * - exten: string (required)
- * - is_external: boolean (required)
- * - replace_channel: Channel
- * - result: string (required)
- * - transferee: Channel
- * BridgeCreated
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge (required)
- * BridgeDestroyed
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge (required)
- * BridgeMerged
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge (required)
- * - bridge_from: Bridge (required)
- * ChannelCallerId
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - caller_presentation: int (required)
- * - caller_presentation_txt: string (required)
- * - channel: Channel (required)
- * ChannelCreated
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * ChannelDestroyed
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - cause: int (required)
- * - cause_txt: string (required)
- * - channel: Channel (required)
- * ChannelDialplan
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * - dialplan_app: string (required)
- * - dialplan_app_data: string (required)
- * ChannelDtmfReceived
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * - digit: string (required)
- * - duration_ms: int (required)
- * ChannelEnteredBridge
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge (required)
- * - channel: Channel
- * ChannelHangupRequest
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - cause: int
- * - channel: Channel (required)
- * - soft: boolean
- * ChannelLeftBridge
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge (required)
- * - channel: Channel (required)
- * ChannelStateChange
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * ChannelTalkingFinished
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * - duration: int (required)
- * ChannelTalkingStarted
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * ChannelUserevent
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - bridge: Bridge
- * - channel: Channel
- * - endpoint: Endpoint
- * - eventname: string (required)
- * - userevent: object (required)
- * ChannelVarset
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel
- * - value: string (required)
- * - variable: string (required)
- * DeviceStateChanged
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - device_state: DeviceState (required)
- * Dial
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - caller: Channel
- * - dialstatus: string (required)
- * - dialstring: string
- * - forward: string
- * - forwarded: Channel
- * - peer: Channel (required)
- * EndpointStateChange
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - endpoint: Endpoint (required)
- * Event
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * Message
- * - type: string (required)
- * MissingParams
- * - type: string (required)
- * - params: List[string] (required)
- * PlaybackFinished
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - playback: Playback (required)
- * PlaybackStarted
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - playback: Playback (required)
- * RecordingFailed
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - recording: LiveRecording (required)
- * RecordingFinished
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - recording: LiveRecording (required)
- * RecordingStarted
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - recording: LiveRecording (required)
- * StasisEnd
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - channel: Channel (required)
- * StasisStart
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - args: List[string] (required)
- * - channel: Channel (required)
- * - replace_channel: Channel
- * TextMessageReceived
- * - type: string (required)
- * - application: string (required)
- * - timestamp: Date
- * - endpoint: Endpoint
- * - message: TextMessage (required)
- * Application
- * - bridge_ids: List[string] (required)
- * - channel_ids: List[string] (required)
- * - device_names: List[string] (required)
- * - endpoint_ids: List[string] (required)
- * - name: string (required)
- */
- #endif /* _ASTERISK_ARI_MODEL_H */
|