Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.814 diff -u -r1.814 chan_sip.c --- channels/chan_sip.c 23 Aug 2005 17:59:26 -0000 1.814 +++ channels/chan_sip.c 24 Aug 2005 18:56:42 -0000 @@ -491,7 +491,7 @@ /* 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) @@ -1548,7 +1548,7 @@ /*--- 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); @@ -7487,7 +7487,7 @@ 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, " No 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); } @@ -11162,6 +11162,7 @@ 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_set2_flag(&global_flags_page2, 1, SIP_PAGE2_RTUPDATE); global_mwitime = DEFAULT_MWITIME; strcpy(global_vmexten, DEFAULT_VMEXTEN); srvlookup = 0; @@ -11190,8 +11191,8 @@ 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")) { Index: configs/sip.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/sip.conf.sample,v retrieving revision 1.65 diff -u -r1.65 sip.conf.sample --- configs/sip.conf.sample 23 Aug 2005 00:50:38 -0000 1.65 +++ configs/sip.conf.sample 24 Aug 2005 18:56:42 -0000 @@ -169,20 +169,25 @@ ; 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|) + ; 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