mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
ARI Outbound Websockets
Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
Code change summary:
* Added an ast_vector_string_join() function,
* Added ApplicationRegistered and ApplicationUnregistered ARI events.
* Converted res/ari/config.c to use sorcery to process ari.conf.
* Added the "outbound-websocket" ARI config object.
* Refactored res/ari/ari_websockets.c to handle outbound websockets.
* Refactored res/ari/cli.c for the sorcery changeover.
* Updated res/res_stasis.c for the sorcery changeover.
* Updated apps/app_stasis.c to allow initiating per-call outbound websockets.
* Added CLI commands to manage ARI websockets.
* Added the new "outbound-websocket" object to ari.conf.sample.
* Moved the ARI XML documentation out of res_ari.c into res/ari/ari_doc.xml
UserNote: Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
(cherry picked from commit 87097b3dd1
)
This commit is contained in:
@@ -403,6 +403,25 @@ char *ast_read_line_from_buffer(char **buffer)
|
||||
return start;
|
||||
}
|
||||
|
||||
char *ast_vector_string_join(struct ast_vector_string *vec, const char *delim)
|
||||
{
|
||||
struct ast_str *buf = ast_str_create(256);
|
||||
char *rtn;
|
||||
int i;
|
||||
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < AST_VECTOR_SIZE(vec); i++) {
|
||||
ast_str_append(&buf, 0, "%s%s", AST_VECTOR_GET(vec, i), delim);
|
||||
}
|
||||
ast_str_truncate(buf, -strlen(delim));
|
||||
rtn = ast_strdup(ast_str_buffer(buf));
|
||||
ast_free(buf);
|
||||
return rtn;
|
||||
}
|
||||
|
||||
int ast_vector_string_split(struct ast_vector_string *dest,
|
||||
const char *input, const char *delim, int flags,
|
||||
int (*excludes_cmp)(const char *s1, const char *s2))
|
||||
|
Reference in New Issue
Block a user