51 #if defined(AST_DEVMODE) 70 #if defined(AST_DEVMODE) 76 #if defined(AST_DEVMODE) 88 if (200 <= code && code <= 299) {
100 "Internal Server Error",
"Response validation failed");
104 fin: __attribute__((unused))
182 #if defined(AST_DEVMODE) 187 for (i = get_params; i; i = i->
next) {
188 if (strcmp(i->
name,
"endpoint") == 0) {
191 if (strcmp(i->
name,
"extension") == 0) {
194 if (strcmp(i->
name,
"context") == 0) {
197 if (strcmp(i->
name,
"priority") == 0) {
200 if (strcmp(i->
name,
"label") == 0) {
203 if (strcmp(i->
name,
"app") == 0) {
206 if (strcmp(i->
name,
"appArgs") == 0) {
209 if (strcmp(i->
name,
"callerId") == 0) {
212 if (strcmp(i->
name,
"timeout") == 0) {
215 if (strcmp(i->
name,
"channelId") == 0) {
218 if (strcmp(i->
name,
"otherChannelId") == 0) {
221 if (strcmp(i->
name,
"originator") == 0) {
224 if (strcmp(i->
name,
"formats") == 0) {
231 #if defined(AST_DEVMODE) 245 if (200 <= code && code <= 299) {
257 "Internal Server Error",
"Response validation failed");
261 fin: __attribute__((unused))
315 #if defined(AST_DEVMODE) 320 for (i = get_params; i; i = i->
next) {
321 if (strcmp(i->
name,
"endpoint") == 0) {
324 if (strcmp(i->
name,
"app") == 0) {
327 if (strcmp(i->
name,
"appArgs") == 0) {
330 if (strcmp(i->
name,
"channelId") == 0) {
333 if (strcmp(i->
name,
"otherChannelId") == 0) {
336 if (strcmp(i->
name,
"originator") == 0) {
339 if (strcmp(i->
name,
"formats") == 0) {
346 #if defined(AST_DEVMODE) 359 if (200 <= code && code <= 299) {
363 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/create\n", code);
371 "Internal Server Error",
"Response validation failed");
375 fin: __attribute__((unused))
392 #if defined(AST_DEVMODE) 397 for (i = path_vars; i; i = i->
next) {
398 if (strcmp(i->
name,
"channelId") == 0) {
404 #if defined(AST_DEVMODE) 417 if (200 <= code && code <= 299) {
421 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}\n", code);
427 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}\n");
429 "Internal Server Error",
"Response validation failed");
433 fin: __attribute__((unused))
507 #if defined(AST_DEVMODE) 512 for (i = get_params; i; i = i->
next) {
513 if (strcmp(i->
name,
"endpoint") == 0) {
516 if (strcmp(i->
name,
"extension") == 0) {
519 if (strcmp(i->
name,
"context") == 0) {
522 if (strcmp(i->
name,
"priority") == 0) {
525 if (strcmp(i->
name,
"label") == 0) {
528 if (strcmp(i->
name,
"app") == 0) {
531 if (strcmp(i->
name,
"appArgs") == 0) {
534 if (strcmp(i->
name,
"callerId") == 0) {
537 if (strcmp(i->
name,
"timeout") == 0) {
540 if (strcmp(i->
name,
"otherChannelId") == 0) {
543 if (strcmp(i->
name,
"originator") == 0) {
546 if (strcmp(i->
name,
"formats") == 0) {
551 for (i = path_vars; i; i = i->
next) {
552 if (strcmp(i->
name,
"channelId") == 0) {
559 #if defined(AST_DEVMODE) 573 if (200 <= code && code <= 299) {
577 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}\n", code);
583 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}\n");
585 "Internal Server Error",
"Response validation failed");
589 fin: __attribute__((unused))
623 #if defined(AST_DEVMODE) 628 for (i = get_params; i; i = i->
next) {
629 if (strcmp(i->
name,
"reason_code") == 0) {
632 if (strcmp(i->
name,
"reason") == 0) {
637 for (i = path_vars; i; i = i->
next) {
638 if (strcmp(i->
name,
"channelId") == 0) {
648 #if defined(AST_DEVMODE) 662 if (200 <= code && code <= 299) {
666 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}\n", code);
672 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}\n");
674 "Internal Server Error",
"Response validation failed");
678 fin: __attribute__((unused))
720 #if defined(AST_DEVMODE) 725 for (i = get_params; i; i = i->
next) {
726 if (strcmp(i->
name,
"context") == 0) {
729 if (strcmp(i->
name,
"extension") == 0) {
732 if (strcmp(i->
name,
"priority") == 0) {
735 if (strcmp(i->
name,
"label") == 0) {
740 for (i = path_vars; i; i = i->
next) {
741 if (strcmp(i->
name,
"channelId") == 0) {
751 #if defined(AST_DEVMODE) 766 if (200 <= code && code <= 299) {
770 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/continue\n", code);
776 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/continue\n");
778 "Internal Server Error",
"Response validation failed");
782 fin: __attribute__((unused))
816 #if defined(AST_DEVMODE) 821 for (i = get_params; i; i = i->
next) {
822 if (strcmp(i->
name,
"app") == 0) {
825 if (strcmp(i->
name,
"appArgs") == 0) {
830 for (i = path_vars; i; i = i->
next) {
831 if (strcmp(i->
name,
"channelId") == 0) {
841 #if defined(AST_DEVMODE) 855 if (200 <= code && code <= 299) {
859 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/move\n", code);
865 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/move\n");
867 "Internal Server Error",
"Response validation failed");
871 fin: __attribute__((unused))
901 #if defined(AST_DEVMODE) 906 for (i = get_params; i; i = i->
next) {
907 if (strcmp(i->
name,
"endpoint") == 0) {
912 for (i = path_vars; i; i = i->
next) {
913 if (strcmp(i->
name,
"channelId") == 0) {
923 #if defined(AST_DEVMODE) 940 if (200 <= code && code <= 299) {
944 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/redirect\n", code);
950 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/redirect\n");
952 "Internal Server Error",
"Response validation failed");
956 fin: __attribute__((unused))
973 #if defined(AST_DEVMODE) 978 for (i = path_vars; i; i = i->
next) {
979 if (strcmp(i->
name,
"channelId") == 0) {
985 #if defined(AST_DEVMODE) 1000 if (200 <= code && code <= 299) {
1004 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/answer\n", code);
1010 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/answer\n");
1012 "Internal Server Error",
"Response validation failed");
1016 fin: __attribute__((unused))
1033 #if defined(AST_DEVMODE) 1038 for (i = path_vars; i; i = i->
next) {
1039 if (strcmp(i->
name,
"channelId") == 0) {
1045 #if defined(AST_DEVMODE) 1060 if (200 <= code && code <= 299) {
1064 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/ring\n", code);
1070 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/ring\n");
1072 "Internal Server Error",
"Response validation failed");
1076 fin: __attribute__((unused))
1093 #if defined(AST_DEVMODE) 1098 for (i = path_vars; i; i = i->
next) {
1099 if (strcmp(i->
name,
"channelId") == 0) {
1105 #if defined(AST_DEVMODE) 1120 if (200 <= code && code <= 299) {
1124 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/ring\n", code);
1130 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/ring\n");
1132 "Internal Server Error",
"Response validation failed");
1136 fin: __attribute__((unused))
1182 #if defined(AST_DEVMODE) 1187 for (i = get_params; i; i = i->
next) {
1188 if (strcmp(i->
name,
"dtmf") == 0) {
1191 if (strcmp(i->
name,
"before") == 0) {
1194 if (strcmp(i->
name,
"between") == 0) {
1197 if (strcmp(i->
name,
"duration") == 0) {
1200 if (strcmp(i->
name,
"after") == 0) {
1205 for (i = path_vars; i; i = i->
next) {
1206 if (strcmp(i->
name,
"channelId") == 0) {
1216 #if defined(AST_DEVMODE) 1232 if (200 <= code && code <= 299) {
1236 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/dtmf\n", code);
1242 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/dtmf\n");
1244 "Internal Server Error",
"Response validation failed");
1248 fin: __attribute__((unused))
1278 #if defined(AST_DEVMODE) 1283 for (i = get_params; i; i = i->
next) {
1284 if (strcmp(i->
name,
"direction") == 0) {
1289 for (i = path_vars; i; i = i->
next) {
1290 if (strcmp(i->
name,
"channelId") == 0) {
1300 #if defined(AST_DEVMODE) 1315 if (200 <= code && code <= 299) {
1319 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/mute\n", code);
1325 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/mute\n");
1327 "Internal Server Error",
"Response validation failed");
1331 fin: __attribute__((unused))
1361 #if defined(AST_DEVMODE) 1366 for (i = get_params; i; i = i->
next) {
1367 if (strcmp(i->
name,
"direction") == 0) {
1372 for (i = path_vars; i; i = i->
next) {
1373 if (strcmp(i->
name,
"channelId") == 0) {
1383 #if defined(AST_DEVMODE) 1398 if (200 <= code && code <= 299) {
1402 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/mute\n", code);
1408 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/mute\n");
1410 "Internal Server Error",
"Response validation failed");
1414 fin: __attribute__((unused))
1431 #if defined(AST_DEVMODE) 1436 for (i = path_vars; i; i = i->
next) {
1437 if (strcmp(i->
name,
"channelId") == 0) {
1443 #if defined(AST_DEVMODE) 1458 if (200 <= code && code <= 299) {
1462 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/hold\n", code);
1468 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/hold\n");
1470 "Internal Server Error",
"Response validation failed");
1474 fin: __attribute__((unused))
1491 #if defined(AST_DEVMODE) 1496 for (i = path_vars; i; i = i->
next) {
1497 if (strcmp(i->
name,
"channelId") == 0) {
1503 #if defined(AST_DEVMODE) 1518 if (200 <= code && code <= 299) {
1522 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/hold\n", code);
1528 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/hold\n");
1530 "Internal Server Error",
"Response validation failed");
1534 fin: __attribute__((unused))
1564 #if defined(AST_DEVMODE) 1569 for (i = get_params; i; i = i->
next) {
1570 if (strcmp(i->
name,
"mohClass") == 0) {
1575 for (i = path_vars; i; i = i->
next) {
1576 if (strcmp(i->
name,
"channelId") == 0) {
1586 #if defined(AST_DEVMODE) 1601 if (200 <= code && code <= 299) {
1605 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/moh\n", code);
1611 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/moh\n");
1613 "Internal Server Error",
"Response validation failed");
1617 fin: __attribute__((unused))
1634 #if defined(AST_DEVMODE) 1639 for (i = path_vars; i; i = i->
next) {
1640 if (strcmp(i->
name,
"channelId") == 0) {
1646 #if defined(AST_DEVMODE) 1661 if (200 <= code && code <= 299) {
1665 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/moh\n", code);
1671 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/moh\n");
1673 "Internal Server Error",
"Response validation failed");
1677 fin: __attribute__((unused))
1694 #if defined(AST_DEVMODE) 1699 for (i = path_vars; i; i = i->
next) {
1700 if (strcmp(i->
name,
"channelId") == 0) {
1706 #if defined(AST_DEVMODE) 1721 if (200 <= code && code <= 299) {
1725 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/silence\n", code);
1731 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/silence\n");
1733 "Internal Server Error",
"Response validation failed");
1737 fin: __attribute__((unused))
1754 #if defined(AST_DEVMODE) 1759 for (i = path_vars; i; i = i->
next) {
1760 if (strcmp(i->
name,
"channelId") == 0) {
1766 #if defined(AST_DEVMODE) 1781 if (200 <= code && code <= 299) {
1785 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/silence\n", code);
1791 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/silence\n");
1793 "Internal Server Error",
"Response validation failed");
1797 fin: __attribute__((unused))
1868 #if defined(AST_DEVMODE) 1873 for (i = get_params; i; i = i->
next) {
1874 if (strcmp(i->
name,
"media") == 0) {
1903 "Too many values for media");
1914 args.
media[j] = (vals[j]);
1917 if (strcmp(i->
name,
"lang") == 0) {
1920 if (strcmp(i->
name,
"offsetms") == 0) {
1923 if (strcmp(i->
name,
"skipms") == 0) {
1926 if (strcmp(i->
name,
"playbackId") == 0) {
1931 for (i = path_vars; i; i = i->
next) {
1932 if (strcmp(i->
name,
"channelId") == 0) {
1942 #if defined(AST_DEVMODE) 1957 if (200 <= code && code <= 299) {
1961 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/play\n", code);
1967 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/play\n");
1969 "Internal Server Error",
"Response validation failed");
1973 fin: __attribute__((unused))
2042 #if defined(AST_DEVMODE) 2047 for (i = get_params; i; i = i->
next) {
2048 if (strcmp(i->
name,
"media") == 0) {
2077 "Too many values for media");
2088 args.
media[j] = (vals[j]);
2091 if (strcmp(i->
name,
"lang") == 0) {
2094 if (strcmp(i->
name,
"offsetms") == 0) {
2097 if (strcmp(i->
name,
"skipms") == 0) {
2102 for (i = path_vars; i; i = i->
next) {
2103 if (strcmp(i->
name,
"channelId") == 0) {
2106 if (strcmp(i->
name,
"playbackId") == 0) {
2116 #if defined(AST_DEVMODE) 2131 if (200 <= code && code <= 299) {
2135 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/play/{playbackId}\n", code);
2141 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/play/{playbackId}\n");
2143 "Internal Server Error",
"Response validation failed");
2147 fin: __attribute__((unused))
2203 #if defined(AST_DEVMODE) 2208 for (i = get_params; i; i = i->
next) {
2209 if (strcmp(i->
name,
"name") == 0) {
2212 if (strcmp(i->
name,
"format") == 0) {
2215 if (strcmp(i->
name,
"maxDurationSeconds") == 0) {
2218 if (strcmp(i->
name,
"maxSilenceSeconds") == 0) {
2221 if (strcmp(i->
name,
"ifExists") == 0) {
2224 if (strcmp(i->
name,
"beep") == 0) {
2227 if (strcmp(i->
name,
"terminateOn") == 0) {
2232 for (i = path_vars; i; i = i->
next) {
2233 if (strcmp(i->
name,
"channelId") == 0) {
2243 #if defined(AST_DEVMODE) 2259 if (200 <= code && code <= 299) {
2263 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/record\n", code);
2269 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/record\n");
2271 "Internal Server Error",
"Response validation failed");
2275 fin: __attribute__((unused))
2305 #if defined(AST_DEVMODE) 2310 for (i = get_params; i; i = i->
next) {
2311 if (strcmp(i->
name,
"variable") == 0) {
2316 for (i = path_vars; i; i = i->
next) {
2317 if (strcmp(i->
name,
"channelId") == 0) {
2327 #if defined(AST_DEVMODE) 2342 if (200 <= code && code <= 299) {
2346 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/variable\n", code);
2352 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/variable\n");
2354 "Internal Server Error",
"Response validation failed");
2358 fin: __attribute__((unused))
2392 #if defined(AST_DEVMODE) 2397 for (i = get_params; i; i = i->
next) {
2398 if (strcmp(i->
name,
"variable") == 0) {
2401 if (strcmp(i->
name,
"value") == 0) {
2406 for (i = path_vars; i; i = i->
next) {
2407 if (strcmp(i->
name,
"channelId") == 0) {
2417 #if defined(AST_DEVMODE) 2432 if (200 <= code && code <= 299) {
2436 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/variable\n", code);
2442 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/variable\n");
2444 "Internal Server Error",
"Response validation failed");
2448 fin: __attribute__((unused))
2494 #if defined(AST_DEVMODE) 2499 for (i = get_params; i; i = i->
next) {
2500 if (strcmp(i->
name,
"spy") == 0) {
2503 if (strcmp(i->
name,
"whisper") == 0) {
2506 if (strcmp(i->
name,
"app") == 0) {
2509 if (strcmp(i->
name,
"appArgs") == 0) {
2512 if (strcmp(i->
name,
"snoopId") == 0) {
2517 for (i = path_vars; i; i = i->
next) {
2518 if (strcmp(i->
name,
"channelId") == 0) {
2528 #if defined(AST_DEVMODE) 2542 if (200 <= code && code <= 299) {
2546 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/snoop\n", code);
2552 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/snoop\n");
2554 "Internal Server Error",
"Response validation failed");
2558 fin: __attribute__((unused))
2600 #if defined(AST_DEVMODE) 2605 for (i = get_params; i; i = i->
next) {
2606 if (strcmp(i->
name,
"spy") == 0) {
2609 if (strcmp(i->
name,
"whisper") == 0) {
2612 if (strcmp(i->
name,
"app") == 0) {
2615 if (strcmp(i->
name,
"appArgs") == 0) {
2620 for (i = path_vars; i; i = i->
next) {
2621 if (strcmp(i->
name,
"channelId") == 0) {
2624 if (strcmp(i->
name,
"snoopId") == 0) {
2634 #if defined(AST_DEVMODE) 2648 if (200 <= code && code <= 299) {
2652 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/snoop/{snoopId}\n", code);
2658 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/snoop/{snoopId}\n");
2660 "Internal Server Error",
"Response validation failed");
2664 fin: __attribute__((unused))
2698 #if defined(AST_DEVMODE) 2703 for (i = get_params; i; i = i->
next) {
2704 if (strcmp(i->
name,
"caller") == 0) {
2707 if (strcmp(i->
name,
"timeout") == 0) {
2712 for (i = path_vars; i; i = i->
next) {
2713 if (strcmp(i->
name,
"channelId") == 0) {
2723 #if defined(AST_DEVMODE) 2737 if (200 <= code && code <= 299) {
2741 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/dial\n", code);
2747 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/dial\n");
2749 "Internal Server Error",
"Response validation failed");
2753 fin: __attribute__((unused))
2770 #if defined(AST_DEVMODE) 2775 for (i = path_vars; i; i = i->
next) {
2776 if (strcmp(i->
name,
"channelId") == 0) {
2782 #if defined(AST_DEVMODE) 2795 if (200 <= code && code <= 299) {
2799 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/{channelId}/rtp_statistics\n", code);
2805 ast_log(
LOG_ERROR,
"Response validation failed for /channels/{channelId}/rtp_statistics\n");
2807 "Internal Server Error",
"Response validation failed");
2811 fin: __attribute__((unused))
2873 #if defined(AST_DEVMODE) 2878 for (i = get_params; i; i = i->
next) {
2879 if (strcmp(i->
name,
"channelId") == 0) {
2882 if (strcmp(i->
name,
"app") == 0) {
2885 if (strcmp(i->
name,
"external_host") == 0) {
2888 if (strcmp(i->
name,
"encapsulation") == 0) {
2891 if (strcmp(i->
name,
"transport") == 0) {
2894 if (strcmp(i->
name,
"connection_type") == 0) {
2897 if (strcmp(i->
name,
"format") == 0) {
2900 if (strcmp(i->
name,
"direction") == 0) {
2903 if (strcmp(i->
name,
"data") == 0) {
2910 #if defined(AST_DEVMODE) 2924 if (200 <= code && code <= 299) {
2928 ast_log(
LOG_ERROR,
"Invalid error response %d for /channels/externalMedia\n", code);
2934 ast_log(
LOG_ERROR,
"Response validation failed for /channels/externalMedia\n");
2936 "Internal Server Error",
"Response validation failed");
2940 fin: __attribute__((unused))
3133 .children = { &
channels_channelId_continue,&
channels_channelId_move,&
channels_channelId_redirect,&
channels_channelId_answer,&
channels_channelId_ring,&
channels_channelId_dtmf,&
channels_channelId_mute,&
channels_channelId_hold,&
channels_channelId_moh,&
channels_channelId_silence,&
channels_channelId_play,&
channels_channelId_record,&
channels_channelId_variable,&
channels_channelId_snoop,&
channels_channelId_dial,&
channels_channelId_rtp_statistics, }
3179 .requires =
"res_ari,res_ari_model,res_stasis,res_stasis_answer,res_stasis_playback,res_stasis_recording,res_stasis_snoop",
struct ast_variable * next
void ast_ari_channels_ring_stop(struct ast_variable *headers, struct ast_ari_channels_ring_stop_args *args, struct ast_ari_response *response)
Stop ringing indication on a channel if locally generated.
int ast_ari_validate_variable(struct ast_json *json)
Validator for Variable.
static struct stasis_rest_handlers channels_externalMedia
REST handler for /api-docs/channels.json.
static void ast_ari_channels_set_channel_var_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/variable.
static void ast_ari_channels_ring_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/ring.
static void ast_ari_channels_stop_silence_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/silence.
void ast_ari_channels_external_media(struct ast_variable *headers, struct ast_ari_channels_external_media_args *args, struct ast_ari_response *response)
Start an External Media session.
Asterisk main include file. File version handling, generic pbx functions.
static void ast_ari_channels_originate_with_id_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}.
void ast_ari_channels_move(struct ast_variable *headers, struct ast_ari_channels_move_args *args, struct ast_ari_response *response)
Move the channel from one Stasis application to another.
static void ast_ari_channels_create_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/create.
static void ast_ari_channels_hangup_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}.
int ast_ari_channels_dial_parse_body(struct ast_json *body, struct ast_ari_channels_dial_args *args)
Body parsing function for /channels/{channelId}/dial.
static void ast_ari_channels_dial_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/dial.
int ast_ari_channels_snoop_channel_parse_body(struct ast_json *body, struct ast_ari_channels_snoop_channel_args *args)
Body parsing function for /channels/{channelId}/snoop.
static int unload_module(void)
static void ast_ari_channels_stop_moh_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/moh.
static void ast_ari_channels_continue_in_dialplan_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/continue.
struct ast_json * variables
void ast_ari_channels_list(struct ast_variable *headers, struct ast_ari_channels_list_args *args, struct ast_ari_response *response)
List all active channels in Asterisk.
static void ast_ari_channels_hold_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/hold.
int ast_ari_channels_originate_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_originate_with_id_args *args)
Body parsing function for /channels/{channelId}.
static void ast_ari_channels_start_silence_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/silence.
static void ast_ari_channels_play_with_id_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/play/{playbackId}.
void ast_ari_channels_originate(struct ast_variable *headers, struct ast_ari_channels_originate_args *args, struct ast_ari_response *response)
Create a new channel (originate).
int ast_ari_channels_mute_parse_body(struct ast_json *body, struct ast_ari_channels_mute_args *args)
Body parsing function for /channels/{channelId}/mute.
static void ast_ari_channels_unmute_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/mute.
int ast_ari_validate_channel(struct ast_json *json)
Validator for Channel.
const char * other_channel_id
static int load_module(void)
int ast_json_is_true(const struct ast_json *value)
Check if value is JSON true.
Structure for variables, used for configurations and for channel variables.
void ast_ari_channels_redirect(struct ast_variable *headers, struct ast_ari_channels_redirect_args *args, struct ast_ari_response *response)
Redirect the channel to a different location.
void ast_ari_channels_get(struct ast_variable *headers, struct ast_ari_channels_get_args *args, struct ast_ari_response *response)
Channel details.
void ast_ari_channels_play_with_id(struct ast_variable *headers, struct ast_ari_channels_play_with_id_args *args, struct ast_ari_response *response)
Start playback of media and specify the playbackId.
static struct stasis_rest_handlers channels_channelId_continue
REST handler for /api-docs/channels.json.
const char * other_channel_id
void ast_ari_channels_record(struct ast_variable *headers, struct ast_ari_channels_record_args *args, struct ast_ari_response *response)
Start a recording.
Generated file - declares stubs to be implemented in res/ari/resource_channels.c. ...
Generated file - Build validators for ARI model objects.
#define ast_strdup(str)
A wrapper for strdup()
static struct stasis_rest_handlers channels_channelId
REST handler for /api-docs/channels.json.
struct ast_json * variables
static struct stasis_rest_handlers channels_channelId_snoop
REST handler for /api-docs/channels.json.
void ast_ari_channels_hold(struct ast_variable *headers, struct ast_ari_channels_hold_args *args, struct ast_ari_response *response)
Hold a channel.
static struct stasis_rest_handlers channels
REST handler for /api-docs/channels.json.
static void ast_ari_channels_rtpstatistics_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/rtp_statistics.
void ast_ari_response_alloc_failed(struct ast_ari_response *response)
Fill in response with a 500 message for allocation failures.
void ast_ari_channels_get_channel_var(struct ast_variable *headers, struct ast_ari_channels_get_channel_var_args *args, struct ast_ari_response *response)
Get the value of a channel variable or function.
static struct stasis_rest_handlers channels_channelId_ring
REST handler for /api-docs/channels.json.
int ast_ari_validate_void(struct ast_json *json)
Validator for native Swagger void.
void ast_ari_channels_rtpstatistics(struct ast_variable *headers, struct ast_ari_channels_rtpstatistics_args *args, struct ast_ari_response *response)
RTP stats on a channel.
int ast_ari_channels_play_parse_body(struct ast_json *body, struct ast_ari_channels_play_args *args)
Body parsing function for /channels/{channelId}/play.
static void ast_ari_channels_external_media_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/externalMedia.
int ast_ari_channels_continue_in_dialplan_parse_body(struct ast_json *body, struct ast_ari_channels_continue_in_dialplan_args *args)
Body parsing function for /channels/{channelId}/continue.
void ast_ari_channels_unmute(struct ast_variable *headers, struct ast_ari_channels_unmute_args *args, struct ast_ari_response *response)
Unmute a channel.
const char * other_channel_id
void ast_ari_channels_create(struct ast_variable *headers, struct ast_ari_channels_create_args *args, struct ast_ari_response *response)
Create channel.
int ast_ari_channels_move_parse_body(struct ast_json *body, struct ast_ari_channels_move_args *args)
Body parsing function for /channels/{channelId}/move.
void ast_ari_channels_answer(struct ast_variable *headers, struct ast_ari_channels_answer_args *args, struct ast_ari_response *response)
Answer a channel.
static struct stasis_rest_handlers channels_channelId_hold
REST handler for /api-docs/channels.json.
void ast_ari_channels_stop_silence(struct ast_variable *headers, struct ast_ari_channels_stop_silence_args *args, struct ast_ari_response *response)
Stop playing silence to a channel.
const char * ast_json_string_get(const struct ast_json *string)
Get the value of a JSON string.
#define ast_malloc(len)
A wrapper for malloc()
void ast_ari_channels_continue_in_dialplan(struct ast_variable *headers, struct ast_ari_channels_continue_in_dialplan_args *args, struct ast_ari_response *response)
Exit application; continue execution in the dialplan.
int ast_ari_channels_originate_parse_body(struct ast_json *body, struct ast_ari_channels_originate_args *args)
Body parsing function for /channels.
static void ast_ari_channels_snoop_channel_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/snoop.
int ast_ari_validate_playback(struct ast_json *json)
Validator for Playback.
void ast_ari_channels_snoop_channel_with_id(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_with_id_args *args, struct ast_ari_response *response)
Start snooping.
static struct stasis_rest_handlers channels_channelId_snoop_snoopId
REST handler for /api-docs/channels.json.
describes a server instance
static void ast_ari_channels_get_channel_var_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/variable.
ari_validator ast_ari_validate_channel_fn(void)
Function pointer to ast_ari_validate_channel().
static struct stasis_rest_handlers channels_channelId_play
REST handler for /api-docs/channels.json.
static struct stasis_rest_handlers channels_channelId_play_playbackId
REST handler for /api-docs/channels.json.
void ast_ari_channels_start_silence(struct ast_variable *headers, struct ast_ari_channels_start_silence_args *args, struct ast_ari_response *response)
Play silence to a channel.
static void ast_ari_channels_mute_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/mute.
struct ast_json * variables
int ast_ari_add_handler(struct stasis_rest_handlers *handler)
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
void ast_ari_channels_send_dtmf(struct ast_variable *headers, struct ast_ari_channels_send_dtmf_args *args, struct ast_ari_response *response)
Send provided DTMF to a given channel.
static void ast_ari_channels_get_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}.
static struct stasis_rest_handlers channels_channelId_redirect
REST handler for /api-docs/channels.json.
static struct stasis_rest_handlers channels_channelId_rtp_statistics
REST handler for /api-docs/channels.json.
int ast_ari_channels_send_dtmf_parse_body(struct ast_json *body, struct ast_ari_channels_send_dtmf_args *args)
Body parsing function for /channels/{channelId}/dtmf.
static void ast_ari_channels_originate_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels.
int ast_ari_channels_play_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_play_with_id_args *args)
Body parsing function for /channels/{channelId}/play/{playbackId}.
static void ast_ari_channels_record_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/record.
static struct stasis_rest_handlers channels_channelId_dial
REST handler for /api-docs/channels.json.
static struct stasis_rest_handlers channels_channelId_move
REST handler for /api-docs/channels.json.
int ast_ari_remove_handler(struct stasis_rest_handlers *handler)
void ast_ari_channels_set_channel_var(struct ast_variable *headers, struct ast_ari_channels_set_channel_var_args *args, struct ast_ari_response *response)
Set the value of a channel variable or function.
static void ast_ari_channels_ring_stop_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/ring.
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
int ast_ari_channels_get_channel_var_parse_body(struct ast_json *body, struct ast_ari_channels_get_channel_var_args *args)
Body parsing function for /channels/{channelId}/variable.
void ast_ari_channels_originate_with_id(struct ast_variable *headers, struct ast_ari_channels_originate_with_id_args *args, struct ast_ari_response *response)
Create a new channel (originate with id).
static void ast_ari_channels_unhold_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/hold.
enum ast_json_type ast_json_typeof(const struct ast_json *value)
Get the type of value.
Module has failed to load, may be in an inconsistent state.
int ast_ari_validate_rtpstat(struct ast_json *json)
Validator for RTPstat.
int ast_ari_validate_live_recording(struct ast_json *json)
Validator for LiveRecording.
struct ast_json * message
int ast_ari_channels_external_media_parse_body(struct ast_json *body, struct ast_ari_channels_external_media_args *args)
Body parsing function for /channels/externalMedia.
void ast_ari_channels_hangup(struct ast_variable *headers, struct ast_ari_channels_hangup_args *args, struct ast_ari_response *response)
Delete (i.e. hangup) a channel.
int ast_ari_channels_snoop_channel_with_id_parse_body(struct ast_json *body, struct ast_ari_channels_snoop_channel_with_id_args *args)
Body parsing function for /channels/{channelId}/snoop/{snoopId}.
void ast_ari_channels_play(struct ast_variable *headers, struct ast_ari_channels_play_args *args, struct ast_ari_response *response)
Start playback of media.
static struct stasis_rest_handlers channels_channelId_variable
REST handler for /api-docs/channels.json.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
static void ast_ari_channels_play_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/play.
void ast_ari_channels_mute(struct ast_variable *headers, struct ast_ari_channels_mute_args *args, struct ast_ari_response *response)
Mute a channel.
const char * path_segment
void ast_ari_channels_start_moh(struct ast_variable *headers, struct ast_ari_channels_start_moh_args *args, struct ast_ari_response *response)
Play music on hold to a channel.
static struct stasis_rest_handlers channels_channelId_record
REST handler for /api-docs/channels.json.
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
size_t ast_json_array_size(const struct ast_json *array)
Get the size of a JSON array.
static void ast_ari_channels_start_moh_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/moh.
Abstract JSON element (object, array, string, int, ...).
int ast_ari_channels_create_parse_body(struct ast_json *body, struct ast_ari_channels_create_args *args)
Body parsing function for /channels/create.
static struct stasis_rest_handlers channels_create
REST handler for /api-docs/channels.json.
void ast_ari_channels_snoop_channel(struct ast_variable *headers, struct ast_ari_channels_snoop_channel_args *args, struct ast_ari_response *response)
Start snooping.
int ast_ari_channels_set_channel_var_parse_body(struct ast_json *body, struct ast_ari_channels_set_channel_var_args *args)
Body parsing function for /channels/{channelId}/variable.
Stasis Application API. See Stasis Application API for detailed documentation.
static struct stasis_rest_handlers channels_channelId_answer
REST handler for /api-docs/channels.json.
void ast_ari_channels_stop_moh(struct ast_variable *headers, struct ast_ari_channels_stop_moh_args *args, struct ast_ari_response *response)
Stop playing music on hold to a channel.
void ast_ari_channels_ring(struct ast_variable *headers, struct ast_ari_channels_ring_args *args, struct ast_ari_response *response)
Indicate ringing to a channel.
int ast_ari_channels_record_parse_body(struct ast_json *body, struct ast_ari_channels_record_args *args)
Body parsing function for /channels/{channelId}/record.
static void ast_ari_channels_list_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels.
static struct stasis_rest_handlers channels_channelId_moh
REST handler for /api-docs/channels.json.
static void ast_ari_channels_send_dtmf_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/dtmf.
int ast_ari_validate_list(struct ast_json *json, int(*fn)(struct ast_json *))
Validator for a Swagger List[]/JSON array.
void ast_ari_channels_dial(struct ast_variable *headers, struct ast_ari_channels_dial_args *args, struct ast_ari_response *response)
Dial a created channel.
#define ASTERISK_GPL_KEY
The text the key() function should return.
static void ast_ari_channels_redirect_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/redirect.
int ast_ari_channels_start_moh_parse_body(struct ast_json *body, struct ast_ari_channels_start_moh_args *args)
Body parsing function for /channels/{channelId}/moh.
Asterisk module definitions.
intmax_t ast_json_integer_get(const struct ast_json *integer)
Get the value from a JSON integer.
static struct stasis_rest_handlers channels_channelId_dtmf
REST handler for /api-docs/channels.json.
static void ast_ari_channels_answer_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/answer.
int ast_ari_channels_redirect_parse_body(struct ast_json *body, struct ast_ari_channels_redirect_args *args)
Body parsing function for /channels/{channelId}/redirect.
struct ast_json * ast_json_array_get(const struct ast_json *array, size_t index)
Get an element from an array.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
static void ast_ari_channels_snoop_channel_with_id_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/snoop/{snoopId}.
void ast_ari_channels_unhold(struct ast_variable *headers, struct ast_ari_channels_unhold_args *args, struct ast_ari_response *response)
Remove a channel from hold.
int ast_ari_channels_unmute_parse_body(struct ast_json *body, struct ast_ari_channels_unmute_args *args)
Body parsing function for /channels/{channelId}/mute.
Handler for a single RESTful path segment.
static struct stasis_rest_handlers channels_channelId_mute
REST handler for /api-docs/channels.json.
static struct stasis_rest_handlers channels_channelId_silence
REST handler for /api-docs/channels.json.
int ast_ari_channels_hangup_parse_body(struct ast_json *body, struct ast_ari_channels_hangup_args *args)
Body parsing function for /channels/{channelId}.
#define ast_app_separate_args(a, b, c, d)
const char * terminate_on
static void ast_ari_channels_move_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /channels/{channelId}/move.