Skip to content

Commit

Permalink
use asterisk eid
Browse files Browse the repository at this point in the history
  • Loading branch information
sboily committed Jul 8, 2022
1 parent 305e4b9 commit 3e16b6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions res_discovery_consul.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ static struct ast_json *consul_put_json(void) {

if (!strcasecmp(global_config.id, "auto")) {
generate_uuid_id_consul();
} else if (!strcasecmp(global_config.id, "asterisk")) {
ast_copy_string(global_config.id, eid, strlen(eid) + 1);
}

ast_json_object_set(obj, "ID", ast_json_string_create(global_config.id));
Expand Down
2 changes: 1 addition & 1 deletion res_discovery_consul.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
enabled=true

[consul]
id=auto ;set id or auto to generate it
id=auto ;set id or auto to generate it, or asterisk to use the asterisk ID
name=asterisk ;set name or auto to discovery with hostname
host=consul
port=8500
Expand Down

0 comments on commit 3e16b6b

Please sign in to comment.