Can anyone shed some light on realtime caching? My desired behavior is that MWI works with realtime voicemail/sip/extensions AND updates to the database take place on the next call to the extensions. Right now I have rtcachefriends=yes, and MWI works, but updates to the database for a cached user seem to still require a reload. It is my understating that removing rtcachefriends will break MWI? Is that true? Is there a best of both worlds approach? MWI and realtime updates to extensions? I have reviewed the info below from the sip.sample.conf, but I must be dense, still don't get it. ;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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050816/8de756ef/attachment.htm
I could be wrong but....sip / iax prune realtime user [user] ? _____ From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Damon Estep Sent: Tuesday, August 16, 2005 5:10 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] realtime caching Can anyone shed some light on realtime caching? My desired behavior is that MWI works with realtime voicemail/sip/extensions AND updates to the database take place on the next call to the extensions. Right now I have rtcachefriends=yes, and MWI works, but updates to the database for a cached user seem to still require a reload. It is my understating that removing rtcachefriends will break MWI? Is that true? Is there a best of both worlds approach? MWI and realtime updates to extensions? I have reviewed the info below from the sip.sample.conf, but I must be dense, still don't get it. ;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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050816/13bd9899/attachment.htm
> I have reviewed the info below from the sip.sample.conf, but I must be> dense, still don?t get it. <flips on tv to the asterisk televangelist channel> "Do you find the RealTime comments in sip.conf just a little too confusing? Are you frustrated by the use of double negatives in configuration options? Do not be afraid. You are not alone. Follow the path to enlightenment and visit: http://bugs.digium.com/view.php?id=4075" > It is my understating that removing rtcachefriends will break MWI? Is > that true? Yes. What exactly are you trying to accomplish? Are your peers/users not being updated in your database? Are you sure? Are you watching debug for SQL log? -Matthew
> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Matthew Boehm > Sent: Tuesday, August 16, 2005 4:14 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] realtime caching > > > I have reviewed the info below from the sip.sample.conf, but I mustbe> > dense, still don't get it. > > <flips on tv to the asterisk televangelist channel> > > "Do you find the RealTime comments in sip.conf just a little too > confusing? Are you frustrated by the use of double negatives in > configuration options? Do not be afraid. You are not alone. Follow the > path to enlightenment and visit: > http://bugs.digium.com/view.php?id=4075" > > > It is my understating that removing rtcachefriends will break MWI?Is> > that true? > > Yes. > > What exactly are you trying to accomplish? Are your peers/users not > being updated in your database? Are you sure? Are you watching debugfor> SQL log? > > -Matthew >We have a web interface where users can update their dialplan online (not in production yet). The web page modifies the mySQL record. It seems that some options are not re-read when caching is on, for example, changing the caller ID value in the sip table has no effect until a reload (or expiration), so at least in some cases rtcahcefriends makes realtime notsorealtime.
> > It seems that some options are not re-read when caching is on, for > > example, changing the caller ID value in the sip table has no effect > > until a reload (or expiration), so at least in some casesrtcahcefriends> > makes realtime notsorealtime. > > No. It is doing exactly what it says it will, "cacheing". If you > have > rtcachefriends turned on, when a peer/user registers the info ispulled> from DB and added to the internal (a la 'in memory') list thatchan_sip> maintains. If you change something in DB after this occurs then your > changes won't take affect because chan_sip has no need to re-lookupyour> phones info since the info is already present in memory. > > What you can do is use "sip prune realtime <name>" to removejust> the > single peer/user from memory. And you can force a reload of that peer > from realtime by using "sip show peer <name> load". > > If you want pure realtime where chan_sip always pulls from db,then> turn caching off. Keep in mind that turning caching off will removeMWI> and NAT functionality. > > -Matthew >What would it take (you, $) to add functionality that is a cross between caching and not, that is it caches with a flag in the extension, so if the flag is present realtime will be queried even though the extension is in cache when a new call comes IN TO that extension. Outgoing calls would not really need a re-query unless something about the provisioning of the phone changes, at which point it would re-register anyways, right? The goal is caching for MWI and NAT but realtime for calling, so the database is checked on every inbound call in case the dialplan changed, and the cache updated accordingly. Maybe a TTL flag, and when the TTL expires the cache entry stays, but is re-queried when a dialplan match is found. The admin could then tune the performance by setting different TTLs, maybe 15 minutes for lightly loaded systems, 4 hours for heavy loaded systems. Dynamic updates take place in whatever timeframe is specified on the TTL or less. Have I missed something, is this functionality already present? Damon
> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Damon Estep > Sent: Wednesday, August 17, 2005 9:00 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] realtime caching > > > > It seems that some options are not re-read when caching is on, for > > > example, changing the caller ID value in the sip table has noeffect> > > until a reload (or expiration), so at least in some cases > rtcahcefriends > > > makes realtime notsorealtime. > > > > No. It is doing exactly what it says it will, "cacheing". If you > > have > > rtcachefriends turned on, when a peer/user registers the info is > pulled > > from DB and added to the internal (a la 'in memory') list that > chan_sip > > maintains. If you change something in DB after this occurs then your > > changes won't take affect because chan_sip has no need to re-lookup > your > > phones info since the info is already present in memory. > > > > What you can do is use "sip prune realtime <name>" to remove > just > > the > > single peer/user from memory. And you can force a reload of thatpeer> > from realtime by using "sip show peer <name> load". > > > > If you want pure realtime where chan_sip always pulls from db, > then > > turn caching off. Keep in mind that turning caching off will remove > MWI > > and NAT functionality. > > > > -Matthew > > > What would it take (you, $) to add functionality that is a crossbetween> caching and not, that is it caches with a flag in the extension, so if > the flag is present realtime will be queried even though the extension > is in cache when a new call comes IN TO that extension. > > Outgoing calls would not really need a re-query unless something about > the provisioning of the phone changes, at which point it would > re-register anyways, right? > > The goal is caching for MWI and NAT but realtime for calling, so the > database is checked on every inbound call in case the dialplanchanged,> and the cache updated accordingly. > > Maybe a TTL flag, and when the TTL expires the cache entry stays, butis> re-queried when a dialplan match is found. The admin could then tunethe> performance by setting different TTLs, maybe 15 minutes for lightly > loaded systems, 4 hours for heavy loaded systems. > > Dynamic updates take place in whatever timeframe is specified on theTTL> or less. > > Have I missed something, is this functionality already present? > > Damon > _______________________________________________I may have answered my own question, is it true that realtime extensions are still queried every call, and only chan_sip is effected by rtcachefriends? Damon
Damon Estep wrote:> I may have answered my own question, is it true that realtime extensions > are still queried every call, and only chan_sip is effected by > rtcachefriends? > > DamonTrue. RealTime Exensions are queried every time. There is no caching of extensions. If you turn on debug log, you can watch each query. -Matthew