/* a new page of flags for peer */
#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_RTIGNOREREGEXPIRE (1 << 3)
/*--- update_peer: Update peer data in database (if used) ---*/
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->flags_page2), SIP_PAGE2_RTCACHEFRIENDS))) {
realtime_update_peer(p->name, &p->addr, p->username, expiry);
ast_cli(fd, " Realtime Peers: %s\n", realtimepeers ? "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, " 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, " Auto Clear: %d\n", global_rtautoclear);
}
ast_set_flag(&global_flags, SIP_DTMF_RFC2833);
ast_set_flag(&global_flags, SIP_NAT_RFC3581);
ast_set_flag(&global_flags, SIP_CAN_REINVITE);
+ ast_set_flag(&global_flags_page2, SIP_PAGE2_RTUPDATE);
global_mwitime = DEFAULT_MWITIME;
strcpy(global_vmexten, DEFAULT_VMEXTEN);
srvlookup = 0;
default_useragent);
} else if (!strcasecmp(v->name, "rtcachefriends")) {
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTCACHEFRIENDS);
- } else if (!strcasecmp(v->name, "rtnoupdate")) {
- ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTNOUPDATE);
+ } else if (!strcasecmp(v->name, "rtupdate")) {
+ ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTUPDATE);
} else if (!strcasecmp(v->name, "rtignoreregexpire")) {
ast_set2_flag((&global_flags_page2), ast_true(v->value), SIP_PAGE2_RTIGNOREREGEXPIRE);
} else if (!strcasecmp(v->name, "rtautoclear")) {
; route = Assume NAT, don't send rport
; (work around more UNIDEN bugs)
-;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
- ; just like friends added from the config file only on a
- ; as-needed basis.
-;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
+;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
+ ; just like friends added from the config file only on a
+ ; as-needed basis? (yes|no)
+
+;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]
; Global credentials for outbound calls, i.e. when a proxy challenges your