mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
clean up rtcaching config options (issue #4075)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -494,7 +494,7 @@ struct sip_auth {
|
|||||||
|
|
||||||
/* a new page of flags for peer */
|
/* a new page of flags for peer */
|
||||||
#define SIP_PAGE2_RTCACHEFRIENDS (1 << 0)
|
#define SIP_PAGE2_RTCACHEFRIENDS (1 << 0)
|
||||||
#define SIP_PAGE2_RTNOUPDATE (1 << 1)
|
#define SIP_PAGE2_RTUPDATE (1 << 1)
|
||||||
#define SIP_PAGE2_RTAUTOCLEAR (1 << 2)
|
#define SIP_PAGE2_RTAUTOCLEAR (1 << 2)
|
||||||
#define SIP_PAGE2_RTIGNOREREGEXPIRE (1 << 3)
|
#define SIP_PAGE2_RTIGNOREREGEXPIRE (1 << 3)
|
||||||
|
|
||||||
@@ -1552,7 +1552,7 @@ static void sip_destroy_peer(struct sip_peer *peer)
|
|||||||
/*--- update_peer: Update peer data in database (if used) ---*/
|
/*--- update_peer: Update peer data in database (if used) ---*/
|
||||||
static void update_peer(struct sip_peer *p, int expiry)
|
static void update_peer(struct sip_peer *p, int expiry)
|
||||||
{
|
{
|
||||||
if (!ast_test_flag((&global_flags_page2), SIP_PAGE2_RTNOUPDATE) &&
|
if (ast_test_flag((&global_flags_page2), SIP_PAGE2_RTUPDATE) &&
|
||||||
(ast_test_flag(p, SIP_REALTIME) ||
|
(ast_test_flag(p, SIP_REALTIME) ||
|
||||||
ast_test_flag(&(p->flags_page2), SIP_PAGE2_RTCACHEFRIENDS))) {
|
ast_test_flag(&(p->flags_page2), SIP_PAGE2_RTCACHEFRIENDS))) {
|
||||||
realtime_update_peer(p->name, &p->addr, p->username, expiry);
|
realtime_update_peer(p->name, &p->addr, p->username, expiry);
|
||||||
@@ -7496,7 +7496,7 @@ static int sip_show_settings(int fd, int argc, char *argv[])
|
|||||||
ast_cli(fd, " Realtime Peers: %s\n", realtimepeers ? "Yes" : "No");
|
ast_cli(fd, " Realtime Peers: %s\n", realtimepeers ? "Yes" : "No");
|
||||||
ast_cli(fd, " Realtime Users: %s\n", realtimeusers ? "Yes" : "No");
|
ast_cli(fd, " Realtime Users: %s\n", realtimeusers ? "Yes" : "No");
|
||||||
ast_cli(fd, " Cache Friends: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTCACHEFRIENDS) ? "Yes" : "No");
|
ast_cli(fd, " Cache Friends: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTCACHEFRIENDS) ? "Yes" : "No");
|
||||||
ast_cli(fd, " No update: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTNOUPDATE) ? "Yes" : "No");
|
ast_cli(fd, " Update: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTUPDATE) ? "Yes" : "No");
|
||||||
ast_cli(fd, " Ignore Reg. Expire: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTIGNOREREGEXPIRE) ? "Yes" : "No");
|
ast_cli(fd, " Ignore Reg. Expire: %s\n", ast_test_flag(&global_flags_page2, SIP_PAGE2_RTIGNOREREGEXPIRE) ? "Yes" : "No");
|
||||||
ast_cli(fd, " Auto Clear: %d\n", global_rtautoclear);
|
ast_cli(fd, " Auto Clear: %d\n", global_rtautoclear);
|
||||||
}
|
}
|
||||||
@@ -11177,6 +11177,7 @@ static int reload_config(void)
|
|||||||
ast_set_flag(&global_flags, SIP_DTMF_RFC2833);
|
ast_set_flag(&global_flags, SIP_DTMF_RFC2833);
|
||||||
ast_set_flag(&global_flags, SIP_NAT_RFC3581);
|
ast_set_flag(&global_flags, SIP_NAT_RFC3581);
|
||||||
ast_set_flag(&global_flags, SIP_CAN_REINVITE);
|
ast_set_flag(&global_flags, SIP_CAN_REINVITE);
|
||||||
|
ast_set_flag(&global_flags_page2, SIP_PAGE2_RTUPDATE);
|
||||||
global_mwitime = DEFAULT_MWITIME;
|
global_mwitime = DEFAULT_MWITIME;
|
||||||
strcpy(global_vmexten, DEFAULT_VMEXTEN);
|
strcpy(global_vmexten, DEFAULT_VMEXTEN);
|
||||||
srvlookup = 0;
|
srvlookup = 0;
|
||||||
@@ -11205,8 +11206,8 @@ static int reload_config(void)
|
|||||||
default_useragent);
|
default_useragent);
|
||||||
} else if (!strcasecmp(v->name, "rtcachefriends")) {
|
} else if (!strcasecmp(v->name, "rtcachefriends")) {
|
||||||
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTCACHEFRIENDS);
|
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTCACHEFRIENDS);
|
||||||
} else if (!strcasecmp(v->name, "rtnoupdate")) {
|
} else if (!strcasecmp(v->name, "rtupdate")) {
|
||||||
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTNOUPDATE);
|
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTUPDATE);
|
||||||
} else if (!strcasecmp(v->name, "rtignoreregexpire")) {
|
} else if (!strcasecmp(v->name, "rtignoreregexpire")) {
|
||||||
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTIGNOREREGEXPIRE);
|
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTIGNOREREGEXPIRE);
|
||||||
} else if (!strcasecmp(v->name, "rtautoclear")) {
|
} else if (!strcasecmp(v->name, "rtautoclear")) {
|
||||||
|
|||||||
@@ -171,18 +171,23 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
|
|||||||
|
|
||||||
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
|
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
|
||||||
; just like friends added from the config file only on a
|
; just like friends added from the config file only on a
|
||||||
; as-needed basis.
|
; as-needed basis? (yes|no)
|
||||||
;rtnoupdate=yes ; do not send the update request over realtime.
|
|
||||||
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
|
|
||||||
; as if it had just registered when the registration expires
|
|
||||||
; the friend will vanish from the configuration until requested
|
|
||||||
; again. If set to an integer, friends expire
|
|
||||||
; within this number of seconds instead of the
|
|
||||||
; same as the registration interval
|
|
||||||
;rtignoreexpire=yes ; when reading a peer from Realtime, if the peer's registration
|
|
||||||
; has expired based on its registration interval, used the stored
|
|
||||||
; address information regardless
|
|
||||||
|
|
||||||
|
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
|
||||||
|
; If set to yes, when a SIP UA registers successfully, the ip address,
|
||||||
|
; the origination port, the registration period, and the username of
|
||||||
|
; the UA will be set to database via realtime. If not present, defaults to 'yes'.
|
||||||
|
|
||||||
|
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
|
||||||
|
; as if it had just registered? (yes|no|<seconds>)
|
||||||
|
; If set to yes, when the registration expires, the friend will vanish from
|
||||||
|
; the configuration until requested again. If set to an integer,
|
||||||
|
; friends expire within this number of seconds instead of the
|
||||||
|
; registration interval.
|
||||||
|
|
||||||
|
;rtignoreexpire=yes ; When reading a peer from Realtime, if the peer's registration
|
||||||
|
; has expired based on its registration interval, used the stored
|
||||||
|
; address information regardless. (yes|no)
|
||||||
|
|
||||||
[authentication]
|
[authentication]
|
||||||
; Global credentials for outbound calls, i.e. when a proxy challenges your
|
; Global credentials for outbound calls, i.e. when a proxy challenges your
|
||||||
|
|||||||
Reference in New Issue
Block a user