ari_model_validators.h 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2013, Digium, Inc.
  5. *
  6. * See http://www.asterisk.org for more information about
  7. * the Asterisk project. Please do not directly contact
  8. * any of the maintainers of this project for assistance;
  9. * the project provides a web site, mailing lists and IRC
  10. * channels for your use.
  11. *
  12. * This program is free software, distributed under the terms of
  13. * the GNU General Public License Version 2. See the LICENSE file
  14. * at the top of the source tree.
  15. */
  16. /*! \file
  17. *
  18. * \brief Generated file - Build validators for ARI model objects.
  19. *
  20. * In addition to the normal validation functions one would normally expect,
  21. * each validator has a ast_ari_validate_{id}_fn() companion function that returns
  22. * the validator's function pointer.
  23. *
  24. * The reason for this seamingly useless indirection is the way function
  25. * pointers interfere with module loading. Asterisk attempts to dlopen() each
  26. * module using \c RTLD_LAZY in order to read some metadata from the module.
  27. * Unfortunately, if you take the address of a function, the function has to be
  28. * resolvable at load time, even if \c RTLD_LAZY is specified. By moving the
  29. * function-address-taking into this module, we can once again be lazy.
  30. */
  31. /*
  32. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  33. * !!!!! DO NOT EDIT !!!!!
  34. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  35. * This file is generated by a mustache template. Please see the original
  36. * template in rest-api-templates/ari_model_validators.h.mustache
  37. */
  38. #ifndef _ASTERISK_ARI_MODEL_H
  39. #define _ASTERISK_ARI_MODEL_H
  40. #include "asterisk/json.h"
  41. /*! @{ */
  42. /*!
  43. * \brief Validator for native Swagger void.
  44. *
  45. * \param json JSON object to validate.
  46. * \returns True (non-zero) if valid.
  47. * \returns False (zero) if invalid.
  48. */
  49. int ast_ari_validate_void(struct ast_json *json);
  50. /*!
  51. * \brief Validator for native Swagger object.
  52. *
  53. * \param json JSON object to validate.
  54. * \returns True (non-zero) if valid.
  55. * \returns False (zero) if invalid.
  56. */
  57. int ast_ari_validate_object(struct ast_json *json);
  58. /*!
  59. * \brief Validator for native Swagger byte.
  60. *
  61. * \param json JSON object to validate.
  62. * \returns True (non-zero) if valid.
  63. * \returns False (zero) if invalid.
  64. */
  65. int ast_ari_validate_byte(struct ast_json *json);
  66. /*!
  67. * \brief Validator for native Swagger boolean.
  68. *
  69. * \param json JSON object to validate.
  70. * \returns True (non-zero) if valid.
  71. * \returns False (zero) if invalid.
  72. */
  73. int ast_ari_validate_boolean(struct ast_json *json);
  74. /*!
  75. * \brief Validator for native Swagger int.
  76. *
  77. * \param json JSON object to validate.
  78. * \returns True (non-zero) if valid.
  79. * \returns False (zero) if invalid.
  80. */
  81. int ast_ari_validate_int(struct ast_json *json);
  82. /*!
  83. * \brief Validator for native Swagger long.
  84. *
  85. * \param json JSON object to validate.
  86. * \returns True (non-zero) if valid.
  87. * \returns False (zero) if invalid.
  88. */
  89. int ast_ari_validate_long(struct ast_json *json);
  90. /*!
  91. * \brief Validator for native Swagger float.
  92. *
  93. * \param json JSON object to validate.
  94. * \returns True (non-zero) if valid.
  95. * \returns False (zero) if invalid.
  96. */
  97. int ast_ari_validate_float(struct ast_json *json);
  98. /*!
  99. * \brief Validator for native Swagger double.
  100. *
  101. * \param json JSON object to validate.
  102. * \returns True (non-zero) if valid.
  103. * \returns False (zero) if invalid.
  104. */
  105. int ast_ari_validate_double(struct ast_json *json);
  106. /*!
  107. * \brief Validator for native Swagger string.
  108. *
  109. * \param json JSON object to validate.
  110. * \returns True (non-zero) if valid.
  111. * \returns False (zero) if invalid.
  112. */
  113. int ast_ari_validate_string(struct ast_json *json);
  114. /*!
  115. * \brief Validator for native Swagger date.
  116. *
  117. * \param json JSON object to validate.
  118. * \returns True (non-zero) if valid.
  119. * \returns False (zero) if invalid.
  120. */
  121. int ast_ari_validate_date(struct ast_json *json);
  122. /*!
  123. * \brief Validator for a Swagger List[]/JSON array.
  124. *
  125. * \param json JSON object to validate.
  126. * \param fn Validator to call on every element in the array.
  127. * \returns True (non-zero) if valid.
  128. * \returns False (zero) if invalid.
  129. */
  130. int ast_ari_validate_list(struct ast_json *json, int (*fn)(struct ast_json *));
  131. /*! @} */
  132. /*!
  133. * \brief Function type for validator functions. Allows for
  134. */
  135. typedef int (*ari_validator)(struct ast_json *json);
  136. /*!
  137. * \brief Validator for AsteriskInfo.
  138. *
  139. * Asterisk system information
  140. *
  141. * \param json JSON object to validate.
  142. * \returns True (non-zero) if valid.
  143. * \returns False (zero) if invalid.
  144. */
  145. int ast_ari_validate_asterisk_info(struct ast_json *json);
  146. /*!
  147. * \brief Function pointer to ast_ari_validate_asterisk_info().
  148. *
  149. * See \ref ast_ari_model_validators.h for more details.
  150. */
  151. ari_validator ast_ari_validate_asterisk_info_fn(void);
  152. /*!
  153. * \brief Validator for AsteriskPing.
  154. *
  155. * Asterisk ping information
  156. *
  157. * \param json JSON object to validate.
  158. * \returns True (non-zero) if valid.
  159. * \returns False (zero) if invalid.
  160. */
  161. int ast_ari_validate_asterisk_ping(struct ast_json *json);
  162. /*!
  163. * \brief Function pointer to ast_ari_validate_asterisk_ping().
  164. *
  165. * See \ref ast_ari_model_validators.h for more details.
  166. */
  167. ari_validator ast_ari_validate_asterisk_ping_fn(void);
  168. /*!
  169. * \brief Validator for BuildInfo.
  170. *
  171. * Info about how Asterisk was built
  172. *
  173. * \param json JSON object to validate.
  174. * \returns True (non-zero) if valid.
  175. * \returns False (zero) if invalid.
  176. */
  177. int ast_ari_validate_build_info(struct ast_json *json);
  178. /*!
  179. * \brief Function pointer to ast_ari_validate_build_info().
  180. *
  181. * See \ref ast_ari_model_validators.h for more details.
  182. */
  183. ari_validator ast_ari_validate_build_info_fn(void);
  184. /*!
  185. * \brief Validator for ConfigInfo.
  186. *
  187. * Info about Asterisk configuration
  188. *
  189. * \param json JSON object to validate.
  190. * \returns True (non-zero) if valid.
  191. * \returns False (zero) if invalid.
  192. */
  193. int ast_ari_validate_config_info(struct ast_json *json);
  194. /*!
  195. * \brief Function pointer to ast_ari_validate_config_info().
  196. *
  197. * See \ref ast_ari_model_validators.h for more details.
  198. */
  199. ari_validator ast_ari_validate_config_info_fn(void);
  200. /*!
  201. * \brief Validator for ConfigTuple.
  202. *
  203. * A key/value pair that makes up part of a configuration object.
  204. *
  205. * \param json JSON object to validate.
  206. * \returns True (non-zero) if valid.
  207. * \returns False (zero) if invalid.
  208. */
  209. int ast_ari_validate_config_tuple(struct ast_json *json);
  210. /*!
  211. * \brief Function pointer to ast_ari_validate_config_tuple().
  212. *
  213. * See \ref ast_ari_model_validators.h for more details.
  214. */
  215. ari_validator ast_ari_validate_config_tuple_fn(void);
  216. /*!
  217. * \brief Validator for LogChannel.
  218. *
  219. * Details of an Asterisk log channel
  220. *
  221. * \param json JSON object to validate.
  222. * \returns True (non-zero) if valid.
  223. * \returns False (zero) if invalid.
  224. */
  225. int ast_ari_validate_log_channel(struct ast_json *json);
  226. /*!
  227. * \brief Function pointer to ast_ari_validate_log_channel().
  228. *
  229. * See \ref ast_ari_model_validators.h for more details.
  230. */
  231. ari_validator ast_ari_validate_log_channel_fn(void);
  232. /*!
  233. * \brief Validator for Module.
  234. *
  235. * Details of an Asterisk module
  236. *
  237. * \param json JSON object to validate.
  238. * \returns True (non-zero) if valid.
  239. * \returns False (zero) if invalid.
  240. */
  241. int ast_ari_validate_module(struct ast_json *json);
  242. /*!
  243. * \brief Function pointer to ast_ari_validate_module().
  244. *
  245. * See \ref ast_ari_model_validators.h for more details.
  246. */
  247. ari_validator ast_ari_validate_module_fn(void);
  248. /*!
  249. * \brief Validator for SetId.
  250. *
  251. * Effective user/group id
  252. *
  253. * \param json JSON object to validate.
  254. * \returns True (non-zero) if valid.
  255. * \returns False (zero) if invalid.
  256. */
  257. int ast_ari_validate_set_id(struct ast_json *json);
  258. /*!
  259. * \brief Function pointer to ast_ari_validate_set_id().
  260. *
  261. * See \ref ast_ari_model_validators.h for more details.
  262. */
  263. ari_validator ast_ari_validate_set_id_fn(void);
  264. /*!
  265. * \brief Validator for StatusInfo.
  266. *
  267. * Info about Asterisk status
  268. *
  269. * \param json JSON object to validate.
  270. * \returns True (non-zero) if valid.
  271. * \returns False (zero) if invalid.
  272. */
  273. int ast_ari_validate_status_info(struct ast_json *json);
  274. /*!
  275. * \brief Function pointer to ast_ari_validate_status_info().
  276. *
  277. * See \ref ast_ari_model_validators.h for more details.
  278. */
  279. ari_validator ast_ari_validate_status_info_fn(void);
  280. /*!
  281. * \brief Validator for SystemInfo.
  282. *
  283. * Info about Asterisk
  284. *
  285. * \param json JSON object to validate.
  286. * \returns True (non-zero) if valid.
  287. * \returns False (zero) if invalid.
  288. */
  289. int ast_ari_validate_system_info(struct ast_json *json);
  290. /*!
  291. * \brief Function pointer to ast_ari_validate_system_info().
  292. *
  293. * See \ref ast_ari_model_validators.h for more details.
  294. */
  295. ari_validator ast_ari_validate_system_info_fn(void);
  296. /*!
  297. * \brief Validator for Variable.
  298. *
  299. * The value of a channel variable
  300. *
  301. * \param json JSON object to validate.
  302. * \returns True (non-zero) if valid.
  303. * \returns False (zero) if invalid.
  304. */
  305. int ast_ari_validate_variable(struct ast_json *json);
  306. /*!
  307. * \brief Function pointer to ast_ari_validate_variable().
  308. *
  309. * See \ref ast_ari_model_validators.h for more details.
  310. */
  311. ari_validator ast_ari_validate_variable_fn(void);
  312. /*!
  313. * \brief Validator for Endpoint.
  314. *
  315. * An external device that may offer/accept calls to/from Asterisk.
  316. *
  317. * Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.
  318. *
  319. * \param json JSON object to validate.
  320. * \returns True (non-zero) if valid.
  321. * \returns False (zero) if invalid.
  322. */
  323. int ast_ari_validate_endpoint(struct ast_json *json);
  324. /*!
  325. * \brief Function pointer to ast_ari_validate_endpoint().
  326. *
  327. * See \ref ast_ari_model_validators.h for more details.
  328. */
  329. ari_validator ast_ari_validate_endpoint_fn(void);
  330. /*!
  331. * \brief Validator for TextMessage.
  332. *
  333. * A text message.
  334. *
  335. * \param json JSON object to validate.
  336. * \returns True (non-zero) if valid.
  337. * \returns False (zero) if invalid.
  338. */
  339. int ast_ari_validate_text_message(struct ast_json *json);
  340. /*!
  341. * \brief Function pointer to ast_ari_validate_text_message().
  342. *
  343. * See \ref ast_ari_model_validators.h for more details.
  344. */
  345. ari_validator ast_ari_validate_text_message_fn(void);
  346. /*!
  347. * \brief Validator for TextMessageVariable.
  348. *
  349. * A key/value pair variable in a text message.
  350. *
  351. * \param json JSON object to validate.
  352. * \returns True (non-zero) if valid.
  353. * \returns False (zero) if invalid.
  354. */
  355. int ast_ari_validate_text_message_variable(struct ast_json *json);
  356. /*!
  357. * \brief Function pointer to ast_ari_validate_text_message_variable().
  358. *
  359. * See \ref ast_ari_model_validators.h for more details.
  360. */
  361. ari_validator ast_ari_validate_text_message_variable_fn(void);
  362. /*!
  363. * \brief Validator for CallerID.
  364. *
  365. * Caller identification
  366. *
  367. * \param json JSON object to validate.
  368. * \returns True (non-zero) if valid.
  369. * \returns False (zero) if invalid.
  370. */
  371. int ast_ari_validate_caller_id(struct ast_json *json);
  372. /*!
  373. * \brief Function pointer to ast_ari_validate_caller_id().
  374. *
  375. * See \ref ast_ari_model_validators.h for more details.
  376. */
  377. ari_validator ast_ari_validate_caller_id_fn(void);
  378. /*!
  379. * \brief Validator for Channel.
  380. *
  381. * A specific communication connection between Asterisk and an Endpoint.
  382. *
  383. * \param json JSON object to validate.
  384. * \returns True (non-zero) if valid.
  385. * \returns False (zero) if invalid.
  386. */
  387. int ast_ari_validate_channel(struct ast_json *json);
  388. /*!
  389. * \brief Function pointer to ast_ari_validate_channel().
  390. *
  391. * See \ref ast_ari_model_validators.h for more details.
  392. */
  393. ari_validator ast_ari_validate_channel_fn(void);
  394. /*!
  395. * \brief Validator for Dialed.
  396. *
  397. * Dialed channel information.
  398. *
  399. * \param json JSON object to validate.
  400. * \returns True (non-zero) if valid.
  401. * \returns False (zero) if invalid.
  402. */
  403. int ast_ari_validate_dialed(struct ast_json *json);
  404. /*!
  405. * \brief Function pointer to ast_ari_validate_dialed().
  406. *
  407. * See \ref ast_ari_model_validators.h for more details.
  408. */
  409. ari_validator ast_ari_validate_dialed_fn(void);
  410. /*!
  411. * \brief Validator for DialplanCEP.
  412. *
  413. * Dialplan location (context/extension/priority)
  414. *
  415. * \param json JSON object to validate.
  416. * \returns True (non-zero) if valid.
  417. * \returns False (zero) if invalid.
  418. */
  419. int ast_ari_validate_dialplan_cep(struct ast_json *json);
  420. /*!
  421. * \brief Function pointer to ast_ari_validate_dialplan_cep().
  422. *
  423. * See \ref ast_ari_model_validators.h for more details.
  424. */
  425. ari_validator ast_ari_validate_dialplan_cep_fn(void);
  426. /*!
  427. * \brief Validator for Bridge.
  428. *
  429. * The merging of media from one or more channels.
  430. *
  431. * Everyone on the bridge receives the same audio.
  432. *
  433. * \param json JSON object to validate.
  434. * \returns True (non-zero) if valid.
  435. * \returns False (zero) if invalid.
  436. */
  437. int ast_ari_validate_bridge(struct ast_json *json);
  438. /*!
  439. * \brief Function pointer to ast_ari_validate_bridge().
  440. *
  441. * See \ref ast_ari_model_validators.h for more details.
  442. */
  443. ari_validator ast_ari_validate_bridge_fn(void);
  444. /*!
  445. * \brief Validator for LiveRecording.
  446. *
  447. * A recording that is in progress
  448. *
  449. * \param json JSON object to validate.
  450. * \returns True (non-zero) if valid.
  451. * \returns False (zero) if invalid.
  452. */
  453. int ast_ari_validate_live_recording(struct ast_json *json);
  454. /*!
  455. * \brief Function pointer to ast_ari_validate_live_recording().
  456. *
  457. * See \ref ast_ari_model_validators.h for more details.
  458. */
  459. ari_validator ast_ari_validate_live_recording_fn(void);
  460. /*!
  461. * \brief Validator for StoredRecording.
  462. *
  463. * A past recording that may be played back.
  464. *
  465. * \param json JSON object to validate.
  466. * \returns True (non-zero) if valid.
  467. * \returns False (zero) if invalid.
  468. */
  469. int ast_ari_validate_stored_recording(struct ast_json *json);
  470. /*!
  471. * \brief Function pointer to ast_ari_validate_stored_recording().
  472. *
  473. * See \ref ast_ari_model_validators.h for more details.
  474. */
  475. ari_validator ast_ari_validate_stored_recording_fn(void);
  476. /*!
  477. * \brief Validator for FormatLangPair.
  478. *
  479. * Identifies the format and language of a sound file
  480. *
  481. * \param json JSON object to validate.
  482. * \returns True (non-zero) if valid.
  483. * \returns False (zero) if invalid.
  484. */
  485. int ast_ari_validate_format_lang_pair(struct ast_json *json);
  486. /*!
  487. * \brief Function pointer to ast_ari_validate_format_lang_pair().
  488. *
  489. * See \ref ast_ari_model_validators.h for more details.
  490. */
  491. ari_validator ast_ari_validate_format_lang_pair_fn(void);
  492. /*!
  493. * \brief Validator for Sound.
  494. *
  495. * A media file that may be played back.
  496. *
  497. * \param json JSON object to validate.
  498. * \returns True (non-zero) if valid.
  499. * \returns False (zero) if invalid.
  500. */
  501. int ast_ari_validate_sound(struct ast_json *json);
  502. /*!
  503. * \brief Function pointer to ast_ari_validate_sound().
  504. *
  505. * See \ref ast_ari_model_validators.h for more details.
  506. */
  507. ari_validator ast_ari_validate_sound_fn(void);
  508. /*!
  509. * \brief Validator for Playback.
  510. *
  511. * Object representing the playback of media to a channel
  512. *
  513. * \param json JSON object to validate.
  514. * \returns True (non-zero) if valid.
  515. * \returns False (zero) if invalid.
  516. */
  517. int ast_ari_validate_playback(struct ast_json *json);
  518. /*!
  519. * \brief Function pointer to ast_ari_validate_playback().
  520. *
  521. * See \ref ast_ari_model_validators.h for more details.
  522. */
  523. ari_validator ast_ari_validate_playback_fn(void);
  524. /*!
  525. * \brief Validator for DeviceState.
  526. *
  527. * Represents the state of a device.
  528. *
  529. * \param json JSON object to validate.
  530. * \returns True (non-zero) if valid.
  531. * \returns False (zero) if invalid.
  532. */
  533. int ast_ari_validate_device_state(struct ast_json *json);
  534. /*!
  535. * \brief Function pointer to ast_ari_validate_device_state().
  536. *
  537. * See \ref ast_ari_model_validators.h for more details.
  538. */
  539. ari_validator ast_ari_validate_device_state_fn(void);
  540. /*!
  541. * \brief Validator for Mailbox.
  542. *
  543. * Represents the state of a mailbox.
  544. *
  545. * \param json JSON object to validate.
  546. * \returns True (non-zero) if valid.
  547. * \returns False (zero) if invalid.
  548. */
  549. int ast_ari_validate_mailbox(struct ast_json *json);
  550. /*!
  551. * \brief Function pointer to ast_ari_validate_mailbox().
  552. *
  553. * See \ref ast_ari_model_validators.h for more details.
  554. */
  555. ari_validator ast_ari_validate_mailbox_fn(void);
  556. /*!
  557. * \brief Validator for ApplicationReplaced.
  558. *
  559. * Notification that another WebSocket has taken over for an application.
  560. *
  561. * 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.
  562. *
  563. * \param json JSON object to validate.
  564. * \returns True (non-zero) if valid.
  565. * \returns False (zero) if invalid.
  566. */
  567. int ast_ari_validate_application_replaced(struct ast_json *json);
  568. /*!
  569. * \brief Function pointer to ast_ari_validate_application_replaced().
  570. *
  571. * See \ref ast_ari_model_validators.h for more details.
  572. */
  573. ari_validator ast_ari_validate_application_replaced_fn(void);
  574. /*!
  575. * \brief Validator for BridgeAttendedTransfer.
  576. *
  577. * Notification that an attended transfer has occurred.
  578. *
  579. * \param json JSON object to validate.
  580. * \returns True (non-zero) if valid.
  581. * \returns False (zero) if invalid.
  582. */
  583. int ast_ari_validate_bridge_attended_transfer(struct ast_json *json);
  584. /*!
  585. * \brief Function pointer to ast_ari_validate_bridge_attended_transfer().
  586. *
  587. * See \ref ast_ari_model_validators.h for more details.
  588. */
  589. ari_validator ast_ari_validate_bridge_attended_transfer_fn(void);
  590. /*!
  591. * \brief Validator for BridgeBlindTransfer.
  592. *
  593. * Notification that a blind transfer has occurred.
  594. *
  595. * \param json JSON object to validate.
  596. * \returns True (non-zero) if valid.
  597. * \returns False (zero) if invalid.
  598. */
  599. int ast_ari_validate_bridge_blind_transfer(struct ast_json *json);
  600. /*!
  601. * \brief Function pointer to ast_ari_validate_bridge_blind_transfer().
  602. *
  603. * See \ref ast_ari_model_validators.h for more details.
  604. */
  605. ari_validator ast_ari_validate_bridge_blind_transfer_fn(void);
  606. /*!
  607. * \brief Validator for BridgeCreated.
  608. *
  609. * Notification that a bridge has been created.
  610. *
  611. * \param json JSON object to validate.
  612. * \returns True (non-zero) if valid.
  613. * \returns False (zero) if invalid.
  614. */
  615. int ast_ari_validate_bridge_created(struct ast_json *json);
  616. /*!
  617. * \brief Function pointer to ast_ari_validate_bridge_created().
  618. *
  619. * See \ref ast_ari_model_validators.h for more details.
  620. */
  621. ari_validator ast_ari_validate_bridge_created_fn(void);
  622. /*!
  623. * \brief Validator for BridgeDestroyed.
  624. *
  625. * Notification that a bridge has been destroyed.
  626. *
  627. * \param json JSON object to validate.
  628. * \returns True (non-zero) if valid.
  629. * \returns False (zero) if invalid.
  630. */
  631. int ast_ari_validate_bridge_destroyed(struct ast_json *json);
  632. /*!
  633. * \brief Function pointer to ast_ari_validate_bridge_destroyed().
  634. *
  635. * See \ref ast_ari_model_validators.h for more details.
  636. */
  637. ari_validator ast_ari_validate_bridge_destroyed_fn(void);
  638. /*!
  639. * \brief Validator for BridgeMerged.
  640. *
  641. * Notification that one bridge has merged into another.
  642. *
  643. * \param json JSON object to validate.
  644. * \returns True (non-zero) if valid.
  645. * \returns False (zero) if invalid.
  646. */
  647. int ast_ari_validate_bridge_merged(struct ast_json *json);
  648. /*!
  649. * \brief Function pointer to ast_ari_validate_bridge_merged().
  650. *
  651. * See \ref ast_ari_model_validators.h for more details.
  652. */
  653. ari_validator ast_ari_validate_bridge_merged_fn(void);
  654. /*!
  655. * \brief Validator for BridgeVideoSourceChanged.
  656. *
  657. * Notification that the source of video in a bridge has changed.
  658. *
  659. * \param json JSON object to validate.
  660. * \returns True (non-zero) if valid.
  661. * \returns False (zero) if invalid.
  662. */
  663. int ast_ari_validate_bridge_video_source_changed(struct ast_json *json);
  664. /*!
  665. * \brief Function pointer to ast_ari_validate_bridge_video_source_changed().
  666. *
  667. * See \ref ast_ari_model_validators.h for more details.
  668. */
  669. ari_validator ast_ari_validate_bridge_video_source_changed_fn(void);
  670. /*!
  671. * \brief Validator for ChannelCallerId.
  672. *
  673. * Channel changed Caller ID.
  674. *
  675. * \param json JSON object to validate.
  676. * \returns True (non-zero) if valid.
  677. * \returns False (zero) if invalid.
  678. */
  679. int ast_ari_validate_channel_caller_id(struct ast_json *json);
  680. /*!
  681. * \brief Function pointer to ast_ari_validate_channel_caller_id().
  682. *
  683. * See \ref ast_ari_model_validators.h for more details.
  684. */
  685. ari_validator ast_ari_validate_channel_caller_id_fn(void);
  686. /*!
  687. * \brief Validator for ChannelConnectedLine.
  688. *
  689. * Channel changed Connected Line.
  690. *
  691. * \param json JSON object to validate.
  692. * \returns True (non-zero) if valid.
  693. * \returns False (zero) if invalid.
  694. */
  695. int ast_ari_validate_channel_connected_line(struct ast_json *json);
  696. /*!
  697. * \brief Function pointer to ast_ari_validate_channel_connected_line().
  698. *
  699. * See \ref ast_ari_model_validators.h for more details.
  700. */
  701. ari_validator ast_ari_validate_channel_connected_line_fn(void);
  702. /*!
  703. * \brief Validator for ChannelCreated.
  704. *
  705. * Notification that a channel has been created.
  706. *
  707. * \param json JSON object to validate.
  708. * \returns True (non-zero) if valid.
  709. * \returns False (zero) if invalid.
  710. */
  711. int ast_ari_validate_channel_created(struct ast_json *json);
  712. /*!
  713. * \brief Function pointer to ast_ari_validate_channel_created().
  714. *
  715. * See \ref ast_ari_model_validators.h for more details.
  716. */
  717. ari_validator ast_ari_validate_channel_created_fn(void);
  718. /*!
  719. * \brief Validator for ChannelDestroyed.
  720. *
  721. * Notification that a channel has been destroyed.
  722. *
  723. * \param json JSON object to validate.
  724. * \returns True (non-zero) if valid.
  725. * \returns False (zero) if invalid.
  726. */
  727. int ast_ari_validate_channel_destroyed(struct ast_json *json);
  728. /*!
  729. * \brief Function pointer to ast_ari_validate_channel_destroyed().
  730. *
  731. * See \ref ast_ari_model_validators.h for more details.
  732. */
  733. ari_validator ast_ari_validate_channel_destroyed_fn(void);
  734. /*!
  735. * \brief Validator for ChannelDialplan.
  736. *
  737. * Channel changed location in the dialplan.
  738. *
  739. * \param json JSON object to validate.
  740. * \returns True (non-zero) if valid.
  741. * \returns False (zero) if invalid.
  742. */
  743. int ast_ari_validate_channel_dialplan(struct ast_json *json);
  744. /*!
  745. * \brief Function pointer to ast_ari_validate_channel_dialplan().
  746. *
  747. * See \ref ast_ari_model_validators.h for more details.
  748. */
  749. ari_validator ast_ari_validate_channel_dialplan_fn(void);
  750. /*!
  751. * \brief Validator for ChannelDtmfReceived.
  752. *
  753. * DTMF received on a channel.
  754. *
  755. * This event is sent when the DTMF ends. There is no notification about the start of DTMF
  756. *
  757. * \param json JSON object to validate.
  758. * \returns True (non-zero) if valid.
  759. * \returns False (zero) if invalid.
  760. */
  761. int ast_ari_validate_channel_dtmf_received(struct ast_json *json);
  762. /*!
  763. * \brief Function pointer to ast_ari_validate_channel_dtmf_received().
  764. *
  765. * See \ref ast_ari_model_validators.h for more details.
  766. */
  767. ari_validator ast_ari_validate_channel_dtmf_received_fn(void);
  768. /*!
  769. * \brief Validator for ChannelEnteredBridge.
  770. *
  771. * Notification that a channel has entered a bridge.
  772. *
  773. * \param json JSON object to validate.
  774. * \returns True (non-zero) if valid.
  775. * \returns False (zero) if invalid.
  776. */
  777. int ast_ari_validate_channel_entered_bridge(struct ast_json *json);
  778. /*!
  779. * \brief Function pointer to ast_ari_validate_channel_entered_bridge().
  780. *
  781. * See \ref ast_ari_model_validators.h for more details.
  782. */
  783. ari_validator ast_ari_validate_channel_entered_bridge_fn(void);
  784. /*!
  785. * \brief Validator for ChannelHangupRequest.
  786. *
  787. * A hangup was requested on the channel.
  788. *
  789. * \param json JSON object to validate.
  790. * \returns True (non-zero) if valid.
  791. * \returns False (zero) if invalid.
  792. */
  793. int ast_ari_validate_channel_hangup_request(struct ast_json *json);
  794. /*!
  795. * \brief Function pointer to ast_ari_validate_channel_hangup_request().
  796. *
  797. * See \ref ast_ari_model_validators.h for more details.
  798. */
  799. ari_validator ast_ari_validate_channel_hangup_request_fn(void);
  800. /*!
  801. * \brief Validator for ChannelHold.
  802. *
  803. * A channel initiated a media hold.
  804. *
  805. * \param json JSON object to validate.
  806. * \returns True (non-zero) if valid.
  807. * \returns False (zero) if invalid.
  808. */
  809. int ast_ari_validate_channel_hold(struct ast_json *json);
  810. /*!
  811. * \brief Function pointer to ast_ari_validate_channel_hold().
  812. *
  813. * See \ref ast_ari_model_validators.h for more details.
  814. */
  815. ari_validator ast_ari_validate_channel_hold_fn(void);
  816. /*!
  817. * \brief Validator for ChannelLeftBridge.
  818. *
  819. * Notification that a channel has left a bridge.
  820. *
  821. * \param json JSON object to validate.
  822. * \returns True (non-zero) if valid.
  823. * \returns False (zero) if invalid.
  824. */
  825. int ast_ari_validate_channel_left_bridge(struct ast_json *json);
  826. /*!
  827. * \brief Function pointer to ast_ari_validate_channel_left_bridge().
  828. *
  829. * See \ref ast_ari_model_validators.h for more details.
  830. */
  831. ari_validator ast_ari_validate_channel_left_bridge_fn(void);
  832. /*!
  833. * \brief Validator for ChannelStateChange.
  834. *
  835. * Notification of a channel's state change.
  836. *
  837. * \param json JSON object to validate.
  838. * \returns True (non-zero) if valid.
  839. * \returns False (zero) if invalid.
  840. */
  841. int ast_ari_validate_channel_state_change(struct ast_json *json);
  842. /*!
  843. * \brief Function pointer to ast_ari_validate_channel_state_change().
  844. *
  845. * See \ref ast_ari_model_validators.h for more details.
  846. */
  847. ari_validator ast_ari_validate_channel_state_change_fn(void);
  848. /*!
  849. * \brief Validator for ChannelTalkingFinished.
  850. *
  851. * Talking is no longer detected on the channel.
  852. *
  853. * \param json JSON object to validate.
  854. * \returns True (non-zero) if valid.
  855. * \returns False (zero) if invalid.
  856. */
  857. int ast_ari_validate_channel_talking_finished(struct ast_json *json);
  858. /*!
  859. * \brief Function pointer to ast_ari_validate_channel_talking_finished().
  860. *
  861. * See \ref ast_ari_model_validators.h for more details.
  862. */
  863. ari_validator ast_ari_validate_channel_talking_finished_fn(void);
  864. /*!
  865. * \brief Validator for ChannelTalkingStarted.
  866. *
  867. * Talking was detected on the channel.
  868. *
  869. * \param json JSON object to validate.
  870. * \returns True (non-zero) if valid.
  871. * \returns False (zero) if invalid.
  872. */
  873. int ast_ari_validate_channel_talking_started(struct ast_json *json);
  874. /*!
  875. * \brief Function pointer to ast_ari_validate_channel_talking_started().
  876. *
  877. * See \ref ast_ari_model_validators.h for more details.
  878. */
  879. ari_validator ast_ari_validate_channel_talking_started_fn(void);
  880. /*!
  881. * \brief Validator for ChannelUnhold.
  882. *
  883. * A channel initiated a media unhold.
  884. *
  885. * \param json JSON object to validate.
  886. * \returns True (non-zero) if valid.
  887. * \returns False (zero) if invalid.
  888. */
  889. int ast_ari_validate_channel_unhold(struct ast_json *json);
  890. /*!
  891. * \brief Function pointer to ast_ari_validate_channel_unhold().
  892. *
  893. * See \ref ast_ari_model_validators.h for more details.
  894. */
  895. ari_validator ast_ari_validate_channel_unhold_fn(void);
  896. /*!
  897. * \brief Validator for ChannelUserevent.
  898. *
  899. * User-generated event with additional user-defined fields in the object.
  900. *
  901. * \param json JSON object to validate.
  902. * \returns True (non-zero) if valid.
  903. * \returns False (zero) if invalid.
  904. */
  905. int ast_ari_validate_channel_userevent(struct ast_json *json);
  906. /*!
  907. * \brief Function pointer to ast_ari_validate_channel_userevent().
  908. *
  909. * See \ref ast_ari_model_validators.h for more details.
  910. */
  911. ari_validator ast_ari_validate_channel_userevent_fn(void);
  912. /*!
  913. * \brief Validator for ChannelVarset.
  914. *
  915. * Channel variable changed.
  916. *
  917. * \param json JSON object to validate.
  918. * \returns True (non-zero) if valid.
  919. * \returns False (zero) if invalid.
  920. */
  921. int ast_ari_validate_channel_varset(struct ast_json *json);
  922. /*!
  923. * \brief Function pointer to ast_ari_validate_channel_varset().
  924. *
  925. * See \ref ast_ari_model_validators.h for more details.
  926. */
  927. ari_validator ast_ari_validate_channel_varset_fn(void);
  928. /*!
  929. * \brief Validator for ContactInfo.
  930. *
  931. * Detailed information about a contact on an endpoint.
  932. *
  933. * \param json JSON object to validate.
  934. * \returns True (non-zero) if valid.
  935. * \returns False (zero) if invalid.
  936. */
  937. int ast_ari_validate_contact_info(struct ast_json *json);
  938. /*!
  939. * \brief Function pointer to ast_ari_validate_contact_info().
  940. *
  941. * See \ref ast_ari_model_validators.h for more details.
  942. */
  943. ari_validator ast_ari_validate_contact_info_fn(void);
  944. /*!
  945. * \brief Validator for ContactStatusChange.
  946. *
  947. * The state of a contact on an endpoint has changed.
  948. *
  949. * \param json JSON object to validate.
  950. * \returns True (non-zero) if valid.
  951. * \returns False (zero) if invalid.
  952. */
  953. int ast_ari_validate_contact_status_change(struct ast_json *json);
  954. /*!
  955. * \brief Function pointer to ast_ari_validate_contact_status_change().
  956. *
  957. * See \ref ast_ari_model_validators.h for more details.
  958. */
  959. ari_validator ast_ari_validate_contact_status_change_fn(void);
  960. /*!
  961. * \brief Validator for DeviceStateChanged.
  962. *
  963. * Notification that a device state has changed.
  964. *
  965. * \param json JSON object to validate.
  966. * \returns True (non-zero) if valid.
  967. * \returns False (zero) if invalid.
  968. */
  969. int ast_ari_validate_device_state_changed(struct ast_json *json);
  970. /*!
  971. * \brief Function pointer to ast_ari_validate_device_state_changed().
  972. *
  973. * See \ref ast_ari_model_validators.h for more details.
  974. */
  975. ari_validator ast_ari_validate_device_state_changed_fn(void);
  976. /*!
  977. * \brief Validator for Dial.
  978. *
  979. * Dialing state has changed.
  980. *
  981. * \param json JSON object to validate.
  982. * \returns True (non-zero) if valid.
  983. * \returns False (zero) if invalid.
  984. */
  985. int ast_ari_validate_dial(struct ast_json *json);
  986. /*!
  987. * \brief Function pointer to ast_ari_validate_dial().
  988. *
  989. * See \ref ast_ari_model_validators.h for more details.
  990. */
  991. ari_validator ast_ari_validate_dial_fn(void);
  992. /*!
  993. * \brief Validator for EndpointStateChange.
  994. *
  995. * Endpoint state changed.
  996. *
  997. * \param json JSON object to validate.
  998. * \returns True (non-zero) if valid.
  999. * \returns False (zero) if invalid.
  1000. */
  1001. int ast_ari_validate_endpoint_state_change(struct ast_json *json);
  1002. /*!
  1003. * \brief Function pointer to ast_ari_validate_endpoint_state_change().
  1004. *
  1005. * See \ref ast_ari_model_validators.h for more details.
  1006. */
  1007. ari_validator ast_ari_validate_endpoint_state_change_fn(void);
  1008. /*!
  1009. * \brief Validator for Event.
  1010. *
  1011. * Base type for asynchronous events from Asterisk.
  1012. *
  1013. * \param json JSON object to validate.
  1014. * \returns True (non-zero) if valid.
  1015. * \returns False (zero) if invalid.
  1016. */
  1017. int ast_ari_validate_event(struct ast_json *json);
  1018. /*!
  1019. * \brief Function pointer to ast_ari_validate_event().
  1020. *
  1021. * See \ref ast_ari_model_validators.h for more details.
  1022. */
  1023. ari_validator ast_ari_validate_event_fn(void);
  1024. /*!
  1025. * \brief Validator for Message.
  1026. *
  1027. * Base type for errors and events
  1028. *
  1029. * \param json JSON object to validate.
  1030. * \returns True (non-zero) if valid.
  1031. * \returns False (zero) if invalid.
  1032. */
  1033. int ast_ari_validate_message(struct ast_json *json);
  1034. /*!
  1035. * \brief Function pointer to ast_ari_validate_message().
  1036. *
  1037. * See \ref ast_ari_model_validators.h for more details.
  1038. */
  1039. ari_validator ast_ari_validate_message_fn(void);
  1040. /*!
  1041. * \brief Validator for MissingParams.
  1042. *
  1043. * Error event sent when required params are missing.
  1044. *
  1045. * \param json JSON object to validate.
  1046. * \returns True (non-zero) if valid.
  1047. * \returns False (zero) if invalid.
  1048. */
  1049. int ast_ari_validate_missing_params(struct ast_json *json);
  1050. /*!
  1051. * \brief Function pointer to ast_ari_validate_missing_params().
  1052. *
  1053. * See \ref ast_ari_model_validators.h for more details.
  1054. */
  1055. ari_validator ast_ari_validate_missing_params_fn(void);
  1056. /*!
  1057. * \brief Validator for Peer.
  1058. *
  1059. * Detailed information about a remote peer that communicates with Asterisk.
  1060. *
  1061. * \param json JSON object to validate.
  1062. * \returns True (non-zero) if valid.
  1063. * \returns False (zero) if invalid.
  1064. */
  1065. int ast_ari_validate_peer(struct ast_json *json);
  1066. /*!
  1067. * \brief Function pointer to ast_ari_validate_peer().
  1068. *
  1069. * See \ref ast_ari_model_validators.h for more details.
  1070. */
  1071. ari_validator ast_ari_validate_peer_fn(void);
  1072. /*!
  1073. * \brief Validator for PeerStatusChange.
  1074. *
  1075. * The state of a peer associated with an endpoint has changed.
  1076. *
  1077. * \param json JSON object to validate.
  1078. * \returns True (non-zero) if valid.
  1079. * \returns False (zero) if invalid.
  1080. */
  1081. int ast_ari_validate_peer_status_change(struct ast_json *json);
  1082. /*!
  1083. * \brief Function pointer to ast_ari_validate_peer_status_change().
  1084. *
  1085. * See \ref ast_ari_model_validators.h for more details.
  1086. */
  1087. ari_validator ast_ari_validate_peer_status_change_fn(void);
  1088. /*!
  1089. * \brief Validator for PlaybackFinished.
  1090. *
  1091. * Event showing the completion of a media playback operation.
  1092. *
  1093. * \param json JSON object to validate.
  1094. * \returns True (non-zero) if valid.
  1095. * \returns False (zero) if invalid.
  1096. */
  1097. int ast_ari_validate_playback_finished(struct ast_json *json);
  1098. /*!
  1099. * \brief Function pointer to ast_ari_validate_playback_finished().
  1100. *
  1101. * See \ref ast_ari_model_validators.h for more details.
  1102. */
  1103. ari_validator ast_ari_validate_playback_finished_fn(void);
  1104. /*!
  1105. * \brief Validator for PlaybackStarted.
  1106. *
  1107. * Event showing the start of a media playback operation.
  1108. *
  1109. * \param json JSON object to validate.
  1110. * \returns True (non-zero) if valid.
  1111. * \returns False (zero) if invalid.
  1112. */
  1113. int ast_ari_validate_playback_started(struct ast_json *json);
  1114. /*!
  1115. * \brief Function pointer to ast_ari_validate_playback_started().
  1116. *
  1117. * See \ref ast_ari_model_validators.h for more details.
  1118. */
  1119. ari_validator ast_ari_validate_playback_started_fn(void);
  1120. /*!
  1121. * \brief Validator for RecordingFailed.
  1122. *
  1123. * Event showing failure of a recording operation.
  1124. *
  1125. * \param json JSON object to validate.
  1126. * \returns True (non-zero) if valid.
  1127. * \returns False (zero) if invalid.
  1128. */
  1129. int ast_ari_validate_recording_failed(struct ast_json *json);
  1130. /*!
  1131. * \brief Function pointer to ast_ari_validate_recording_failed().
  1132. *
  1133. * See \ref ast_ari_model_validators.h for more details.
  1134. */
  1135. ari_validator ast_ari_validate_recording_failed_fn(void);
  1136. /*!
  1137. * \brief Validator for RecordingFinished.
  1138. *
  1139. * Event showing the completion of a recording operation.
  1140. *
  1141. * \param json JSON object to validate.
  1142. * \returns True (non-zero) if valid.
  1143. * \returns False (zero) if invalid.
  1144. */
  1145. int ast_ari_validate_recording_finished(struct ast_json *json);
  1146. /*!
  1147. * \brief Function pointer to ast_ari_validate_recording_finished().
  1148. *
  1149. * See \ref ast_ari_model_validators.h for more details.
  1150. */
  1151. ari_validator ast_ari_validate_recording_finished_fn(void);
  1152. /*!
  1153. * \brief Validator for RecordingStarted.
  1154. *
  1155. * Event showing the start of a recording operation.
  1156. *
  1157. * \param json JSON object to validate.
  1158. * \returns True (non-zero) if valid.
  1159. * \returns False (zero) if invalid.
  1160. */
  1161. int ast_ari_validate_recording_started(struct ast_json *json);
  1162. /*!
  1163. * \brief Function pointer to ast_ari_validate_recording_started().
  1164. *
  1165. * See \ref ast_ari_model_validators.h for more details.
  1166. */
  1167. ari_validator ast_ari_validate_recording_started_fn(void);
  1168. /*!
  1169. * \brief Validator for StasisEnd.
  1170. *
  1171. * Notification that a channel has left a Stasis application.
  1172. *
  1173. * \param json JSON object to validate.
  1174. * \returns True (non-zero) if valid.
  1175. * \returns False (zero) if invalid.
  1176. */
  1177. int ast_ari_validate_stasis_end(struct ast_json *json);
  1178. /*!
  1179. * \brief Function pointer to ast_ari_validate_stasis_end().
  1180. *
  1181. * See \ref ast_ari_model_validators.h for more details.
  1182. */
  1183. ari_validator ast_ari_validate_stasis_end_fn(void);
  1184. /*!
  1185. * \brief Validator for StasisStart.
  1186. *
  1187. * Notification that a channel has entered a Stasis application.
  1188. *
  1189. * \param json JSON object to validate.
  1190. * \returns True (non-zero) if valid.
  1191. * \returns False (zero) if invalid.
  1192. */
  1193. int ast_ari_validate_stasis_start(struct ast_json *json);
  1194. /*!
  1195. * \brief Function pointer to ast_ari_validate_stasis_start().
  1196. *
  1197. * See \ref ast_ari_model_validators.h for more details.
  1198. */
  1199. ari_validator ast_ari_validate_stasis_start_fn(void);
  1200. /*!
  1201. * \brief Validator for TextMessageReceived.
  1202. *
  1203. * A text message was received from an endpoint.
  1204. *
  1205. * \param json JSON object to validate.
  1206. * \returns True (non-zero) if valid.
  1207. * \returns False (zero) if invalid.
  1208. */
  1209. int ast_ari_validate_text_message_received(struct ast_json *json);
  1210. /*!
  1211. * \brief Function pointer to ast_ari_validate_text_message_received().
  1212. *
  1213. * See \ref ast_ari_model_validators.h for more details.
  1214. */
  1215. ari_validator ast_ari_validate_text_message_received_fn(void);
  1216. /*!
  1217. * \brief Validator for Application.
  1218. *
  1219. * Details of a Stasis application
  1220. *
  1221. * \param json JSON object to validate.
  1222. * \returns True (non-zero) if valid.
  1223. * \returns False (zero) if invalid.
  1224. */
  1225. int ast_ari_validate_application(struct ast_json *json);
  1226. /*!
  1227. * \brief Function pointer to ast_ari_validate_application().
  1228. *
  1229. * See \ref ast_ari_model_validators.h for more details.
  1230. */
  1231. ari_validator ast_ari_validate_application_fn(void);
  1232. /*
  1233. * JSON models
  1234. *
  1235. * AsteriskInfo
  1236. * - build: BuildInfo
  1237. * - config: ConfigInfo
  1238. * - status: StatusInfo
  1239. * - system: SystemInfo
  1240. * AsteriskPing
  1241. * - asterisk_id: string (required)
  1242. * - ping: string (required)
  1243. * - timestamp: string (required)
  1244. * BuildInfo
  1245. * - date: string (required)
  1246. * - kernel: string (required)
  1247. * - machine: string (required)
  1248. * - options: string (required)
  1249. * - os: string (required)
  1250. * - user: string (required)
  1251. * ConfigInfo
  1252. * - default_language: string (required)
  1253. * - max_channels: int
  1254. * - max_load: double
  1255. * - max_open_files: int
  1256. * - name: string (required)
  1257. * - setid: SetId (required)
  1258. * ConfigTuple
  1259. * - attribute: string (required)
  1260. * - value: string (required)
  1261. * LogChannel
  1262. * - channel: string (required)
  1263. * - configuration: string (required)
  1264. * - status: string (required)
  1265. * - type: string (required)
  1266. * Module
  1267. * - description: string (required)
  1268. * - name: string (required)
  1269. * - status: string (required)
  1270. * - support_level: string (required)
  1271. * - use_count: int (required)
  1272. * SetId
  1273. * - group: string (required)
  1274. * - user: string (required)
  1275. * StatusInfo
  1276. * - last_reload_time: Date (required)
  1277. * - startup_time: Date (required)
  1278. * SystemInfo
  1279. * - entity_id: string (required)
  1280. * - version: string (required)
  1281. * Variable
  1282. * - value: string (required)
  1283. * Endpoint
  1284. * - channel_ids: List[string] (required)
  1285. * - resource: string (required)
  1286. * - state: string
  1287. * - technology: string (required)
  1288. * TextMessage
  1289. * - body: string (required)
  1290. * - from: string (required)
  1291. * - to: string (required)
  1292. * - variables: List[TextMessageVariable]
  1293. * TextMessageVariable
  1294. * - key: string (required)
  1295. * - value: string (required)
  1296. * CallerID
  1297. * - name: string (required)
  1298. * - number: string (required)
  1299. * Channel
  1300. * - accountcode: string (required)
  1301. * - caller: CallerID (required)
  1302. * - connected: CallerID (required)
  1303. * - creationtime: Date (required)
  1304. * - dialplan: DialplanCEP (required)
  1305. * - id: string (required)
  1306. * - language: string (required)
  1307. * - name: string (required)
  1308. * - state: string (required)
  1309. * Dialed
  1310. * DialplanCEP
  1311. * - context: string (required)
  1312. * - exten: string (required)
  1313. * - priority: long (required)
  1314. * Bridge
  1315. * - bridge_class: string (required)
  1316. * - bridge_type: string (required)
  1317. * - channels: List[string] (required)
  1318. * - creator: string (required)
  1319. * - id: string (required)
  1320. * - name: string (required)
  1321. * - technology: string (required)
  1322. * - video_mode: string
  1323. * - video_source_id: string
  1324. * LiveRecording
  1325. * - cause: string
  1326. * - duration: int
  1327. * - format: string (required)
  1328. * - name: string (required)
  1329. * - silence_duration: int
  1330. * - state: string (required)
  1331. * - talking_duration: int
  1332. * - target_uri: string (required)
  1333. * StoredRecording
  1334. * - format: string (required)
  1335. * - name: string (required)
  1336. * FormatLangPair
  1337. * - format: string (required)
  1338. * - language: string (required)
  1339. * Sound
  1340. * - formats: List[FormatLangPair] (required)
  1341. * - id: string (required)
  1342. * - text: string
  1343. * Playback
  1344. * - id: string (required)
  1345. * - language: string
  1346. * - media_uri: string (required)
  1347. * - state: string (required)
  1348. * - target_uri: string (required)
  1349. * DeviceState
  1350. * - name: string (required)
  1351. * - state: string (required)
  1352. * Mailbox
  1353. * - name: string (required)
  1354. * - new_messages: int (required)
  1355. * - old_messages: int (required)
  1356. * ApplicationReplaced
  1357. * - asterisk_id: string
  1358. * - type: string (required)
  1359. * - application: string (required)
  1360. * - timestamp: Date
  1361. * BridgeAttendedTransfer
  1362. * - asterisk_id: string
  1363. * - type: string (required)
  1364. * - application: string (required)
  1365. * - timestamp: Date
  1366. * - destination_application: string
  1367. * - destination_bridge: string
  1368. * - destination_link_first_leg: Channel
  1369. * - destination_link_second_leg: Channel
  1370. * - destination_threeway_bridge: Bridge
  1371. * - destination_threeway_channel: Channel
  1372. * - destination_type: string (required)
  1373. * - is_external: boolean (required)
  1374. * - replace_channel: Channel
  1375. * - result: string (required)
  1376. * - transfer_target: Channel
  1377. * - transferee: Channel
  1378. * - transferer_first_leg: Channel (required)
  1379. * - transferer_first_leg_bridge: Bridge
  1380. * - transferer_second_leg: Channel (required)
  1381. * - transferer_second_leg_bridge: Bridge
  1382. * BridgeBlindTransfer
  1383. * - asterisk_id: string
  1384. * - type: string (required)
  1385. * - application: string (required)
  1386. * - timestamp: Date
  1387. * - bridge: Bridge
  1388. * - channel: Channel (required)
  1389. * - context: string (required)
  1390. * - exten: string (required)
  1391. * - is_external: boolean (required)
  1392. * - replace_channel: Channel
  1393. * - result: string (required)
  1394. * - transferee: Channel
  1395. * BridgeCreated
  1396. * - asterisk_id: string
  1397. * - type: string (required)
  1398. * - application: string (required)
  1399. * - timestamp: Date
  1400. * - bridge: Bridge (required)
  1401. * BridgeDestroyed
  1402. * - asterisk_id: string
  1403. * - type: string (required)
  1404. * - application: string (required)
  1405. * - timestamp: Date
  1406. * - bridge: Bridge (required)
  1407. * BridgeMerged
  1408. * - asterisk_id: string
  1409. * - type: string (required)
  1410. * - application: string (required)
  1411. * - timestamp: Date
  1412. * - bridge: Bridge (required)
  1413. * - bridge_from: Bridge (required)
  1414. * BridgeVideoSourceChanged
  1415. * - asterisk_id: string
  1416. * - type: string (required)
  1417. * - application: string (required)
  1418. * - timestamp: Date
  1419. * - bridge: Bridge (required)
  1420. * - old_video_source_id: string
  1421. * ChannelCallerId
  1422. * - asterisk_id: string
  1423. * - type: string (required)
  1424. * - application: string (required)
  1425. * - timestamp: Date
  1426. * - caller_presentation: int (required)
  1427. * - caller_presentation_txt: string (required)
  1428. * - channel: Channel (required)
  1429. * ChannelConnectedLine
  1430. * - asterisk_id: string
  1431. * - type: string (required)
  1432. * - application: string (required)
  1433. * - timestamp: Date
  1434. * - channel: Channel (required)
  1435. * ChannelCreated
  1436. * - asterisk_id: string
  1437. * - type: string (required)
  1438. * - application: string (required)
  1439. * - timestamp: Date
  1440. * - channel: Channel (required)
  1441. * ChannelDestroyed
  1442. * - asterisk_id: string
  1443. * - type: string (required)
  1444. * - application: string (required)
  1445. * - timestamp: Date
  1446. * - cause: int (required)
  1447. * - cause_txt: string (required)
  1448. * - channel: Channel (required)
  1449. * ChannelDialplan
  1450. * - asterisk_id: string
  1451. * - type: string (required)
  1452. * - application: string (required)
  1453. * - timestamp: Date
  1454. * - channel: Channel (required)
  1455. * - dialplan_app: string (required)
  1456. * - dialplan_app_data: string (required)
  1457. * ChannelDtmfReceived
  1458. * - asterisk_id: string
  1459. * - type: string (required)
  1460. * - application: string (required)
  1461. * - timestamp: Date
  1462. * - channel: Channel (required)
  1463. * - digit: string (required)
  1464. * - duration_ms: int (required)
  1465. * ChannelEnteredBridge
  1466. * - asterisk_id: string
  1467. * - type: string (required)
  1468. * - application: string (required)
  1469. * - timestamp: Date
  1470. * - bridge: Bridge (required)
  1471. * - channel: Channel
  1472. * ChannelHangupRequest
  1473. * - asterisk_id: string
  1474. * - type: string (required)
  1475. * - application: string (required)
  1476. * - timestamp: Date
  1477. * - cause: int
  1478. * - channel: Channel (required)
  1479. * - soft: boolean
  1480. * ChannelHold
  1481. * - asterisk_id: string
  1482. * - type: string (required)
  1483. * - application: string (required)
  1484. * - timestamp: Date
  1485. * - channel: Channel (required)
  1486. * - musicclass: string
  1487. * ChannelLeftBridge
  1488. * - asterisk_id: string
  1489. * - type: string (required)
  1490. * - application: string (required)
  1491. * - timestamp: Date
  1492. * - bridge: Bridge (required)
  1493. * - channel: Channel (required)
  1494. * ChannelStateChange
  1495. * - asterisk_id: string
  1496. * - type: string (required)
  1497. * - application: string (required)
  1498. * - timestamp: Date
  1499. * - channel: Channel (required)
  1500. * ChannelTalkingFinished
  1501. * - asterisk_id: string
  1502. * - type: string (required)
  1503. * - application: string (required)
  1504. * - timestamp: Date
  1505. * - channel: Channel (required)
  1506. * - duration: int (required)
  1507. * ChannelTalkingStarted
  1508. * - asterisk_id: string
  1509. * - type: string (required)
  1510. * - application: string (required)
  1511. * - timestamp: Date
  1512. * - channel: Channel (required)
  1513. * ChannelUnhold
  1514. * - asterisk_id: string
  1515. * - type: string (required)
  1516. * - application: string (required)
  1517. * - timestamp: Date
  1518. * - channel: Channel (required)
  1519. * ChannelUserevent
  1520. * - asterisk_id: string
  1521. * - type: string (required)
  1522. * - application: string (required)
  1523. * - timestamp: Date
  1524. * - bridge: Bridge
  1525. * - channel: Channel
  1526. * - endpoint: Endpoint
  1527. * - eventname: string (required)
  1528. * - userevent: object (required)
  1529. * ChannelVarset
  1530. * - asterisk_id: string
  1531. * - type: string (required)
  1532. * - application: string (required)
  1533. * - timestamp: Date
  1534. * - channel: Channel
  1535. * - value: string (required)
  1536. * - variable: string (required)
  1537. * ContactInfo
  1538. * - aor: string (required)
  1539. * - contact_status: string (required)
  1540. * - roundtrip_usec: string
  1541. * - uri: string (required)
  1542. * ContactStatusChange
  1543. * - asterisk_id: string
  1544. * - type: string (required)
  1545. * - application: string (required)
  1546. * - timestamp: Date
  1547. * - contact_info: ContactInfo (required)
  1548. * - endpoint: Endpoint (required)
  1549. * DeviceStateChanged
  1550. * - asterisk_id: string
  1551. * - type: string (required)
  1552. * - application: string (required)
  1553. * - timestamp: Date
  1554. * - device_state: DeviceState (required)
  1555. * Dial
  1556. * - asterisk_id: string
  1557. * - type: string (required)
  1558. * - application: string (required)
  1559. * - timestamp: Date
  1560. * - caller: Channel
  1561. * - dialstatus: string (required)
  1562. * - dialstring: string
  1563. * - forward: string
  1564. * - forwarded: Channel
  1565. * - peer: Channel (required)
  1566. * EndpointStateChange
  1567. * - asterisk_id: string
  1568. * - type: string (required)
  1569. * - application: string (required)
  1570. * - timestamp: Date
  1571. * - endpoint: Endpoint (required)
  1572. * Event
  1573. * - asterisk_id: string
  1574. * - type: string (required)
  1575. * - application: string (required)
  1576. * - timestamp: Date
  1577. * Message
  1578. * - asterisk_id: string
  1579. * - type: string (required)
  1580. * MissingParams
  1581. * - asterisk_id: string
  1582. * - type: string (required)
  1583. * - params: List[string] (required)
  1584. * Peer
  1585. * - address: string
  1586. * - cause: string
  1587. * - peer_status: string (required)
  1588. * - port: string
  1589. * - time: string
  1590. * PeerStatusChange
  1591. * - asterisk_id: string
  1592. * - type: string (required)
  1593. * - application: string (required)
  1594. * - timestamp: Date
  1595. * - endpoint: Endpoint (required)
  1596. * - peer: Peer (required)
  1597. * PlaybackFinished
  1598. * - asterisk_id: string
  1599. * - type: string (required)
  1600. * - application: string (required)
  1601. * - timestamp: Date
  1602. * - playback: Playback (required)
  1603. * PlaybackStarted
  1604. * - asterisk_id: string
  1605. * - type: string (required)
  1606. * - application: string (required)
  1607. * - timestamp: Date
  1608. * - playback: Playback (required)
  1609. * RecordingFailed
  1610. * - asterisk_id: string
  1611. * - type: string (required)
  1612. * - application: string (required)
  1613. * - timestamp: Date
  1614. * - recording: LiveRecording (required)
  1615. * RecordingFinished
  1616. * - asterisk_id: string
  1617. * - type: string (required)
  1618. * - application: string (required)
  1619. * - timestamp: Date
  1620. * - recording: LiveRecording (required)
  1621. * RecordingStarted
  1622. * - asterisk_id: string
  1623. * - type: string (required)
  1624. * - application: string (required)
  1625. * - timestamp: Date
  1626. * - recording: LiveRecording (required)
  1627. * StasisEnd
  1628. * - asterisk_id: string
  1629. * - type: string (required)
  1630. * - application: string (required)
  1631. * - timestamp: Date
  1632. * - channel: Channel (required)
  1633. * StasisStart
  1634. * - asterisk_id: string
  1635. * - type: string (required)
  1636. * - application: string (required)
  1637. * - timestamp: Date
  1638. * - args: List[string] (required)
  1639. * - channel: Channel (required)
  1640. * - replace_channel: Channel
  1641. * TextMessageReceived
  1642. * - asterisk_id: string
  1643. * - type: string (required)
  1644. * - application: string (required)
  1645. * - timestamp: Date
  1646. * - endpoint: Endpoint
  1647. * - message: TextMessage (required)
  1648. * Application
  1649. * - bridge_ids: List[string] (required)
  1650. * - channel_ids: List[string] (required)
  1651. * - device_names: List[string] (required)
  1652. * - endpoint_ids: List[string] (required)
  1653. * - name: string (required)
  1654. */
  1655. #endif /* _ASTERISK_ARI_MODEL_H */