diff options
author | Olle Johansson <oej@edvina.net> | 2006-05-11 13:54:00 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-05-11 13:54:00 +0000 |
commit | 5237a0e06d7c6a7b86f73d03cb07df7f59fa886f (patch) | |
tree | 49846b0745fb8955f9d7fdb5f9abac13612adc73 /manager.c | |
parent | 76347c8d3111523dbfdb782f098f013fe23f9bf7 (diff) |
- Use systemname for realm in sip, if we have no configuration for realm
- Optionally send systemname in manager (cool when you have a manager proxy)
- Use systemname in CLI prompt
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'manager.c')
-rw-r--r-- | manager.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -158,6 +158,7 @@ static struct mansession { char inbuf[AST_MAX_MANHEADER_LEN]; int inlen; int send_events; + int displaysystemname; /*!< Add system name to manager responses and events */ /* Queued events that we've not had the ability to send yet */ struct eventqent *eventq; /* Timeout for ast_carefulwrite() */ @@ -772,6 +773,14 @@ static int authenticate(struct mansession *s, struct message *m) while (v) { if (!strcasecmp(v->name, "secret")) { password = v->value; + } else if (!strcasecmp(v->name, "displaysystemname")) { + if (ast_true(v->value)) { + if (ast_strlen_zero(ast_config_AST_SYSTEM_NAME)) { + s->displaysystemname = 1; + } else { + ast_log(LOG_ERROR, "Can't enable displaysystemname in manager.conf - no system name configured in asterisk.conf\n"); + } + } } else if (!strcasecmp(v->name, "permit") || !strcasecmp(v->name, "deny")) { ha = ast_append_ha(v->name, v->value, ha); |