Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
add signalling.registrar section
Browse files Browse the repository at this point in the history
  • Loading branch information
furmur committed Jul 7, 2019
1 parent f1c1db2 commit 6f10e65
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
10 changes: 9 additions & 1 deletion server/etc/system.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,15 @@ signalling {
registrations {
check_interval = 5000
}


registrar {
enabled = false
redis {
host = 127.0.0.1
port = 6379
}
}

rpc {
calls_show_limit = 1000
}
Expand Down
7 changes: 7 additions & 0 deletions server/src/node_cfg_providers/yeti_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ void yeti_cfg_provider::apply_cfg_node(cfg_t *in_cfg,
c = cfg_getsec(y,"registrations");
add2hash(c,"reg_check_interval","check_interval",out);

//registrar
c = cfg_getsec(y,"registrar");
add2hash(c,"registrar_enabled","enabled",out);
c = cfg_getsec(c, "redis");
add2hash(c,"registrar_redis_host","host",out);
add2hash(c,"registrar_redis_port","port",out);

//rpc
c = cfg_getsec(y,"rpc");
add2hash(c,"calls_show_limit","calls_show_limit",out);
Expand Down
15 changes: 15 additions & 0 deletions server/src/opts/yeti_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ cfg_opt_t sig_yeti_reg_opts[] = {
CFG_END()
};

//registrar

cfg_opt_t sig_yeti_registrar_redis_opts[] = {
DCFG_STR(host),
DCFG_INT(port),
CFG_END()
};

cfg_opt_t sig_yeti_registrar_opts[] = {
DCFG_BOOL(enabled),
DCFG_SEC(redis,sig_yeti_registrar_redis_opts,CFGF_NONE),
CFG_END()
};

//auth
cfg_opt_t sig_yeti_auth_opts[] = {
DCFG_STR(realm),
Expand All @@ -103,6 +117,7 @@ cfg_opt_t sig_yeti_opts[] = {
DCFG_SEC(cdr,sig_yeti_cdr_opts,CFGF_NONE),
DCFG_SEC(resources,sig_yeti_resources_opts,CFGF_NONE),
DCFG_SEC(registrations,sig_yeti_reg_opts,CFGF_NONE),
DCFG_SEC(registrar,sig_yeti_registrar_opts,CFGF_NONE),
DCFG_SEC(rpc,sig_yeti_rpc_opts,CFGF_NONE),
DCFG_SEC(statistics,sig_yeti_statistics_opts,CFGF_NONE),
DCFG_SEC(auth,sig_yeti_auth_opts,CFGF_NONE),
Expand Down

0 comments on commit 6f10e65

Please sign in to comment.