[asterisk-dev] [Code Review] 2598: chan_pjsip: Stateful Contact Expiration
Mark Michelson
reviewboard at asterisk.org
Thu Jun 6 17:25:04 CDT 2013
> On June 6, 2013, 9:15 p.m., Mark Michelson wrote:
> > I think this should be either
> >
> > 1) part of res_sip_registrar or
> > 2) in the res_sip "core"
> >
> > With the current setup, someone could potentially load res_sip_registrar but not res_sip_registrar_expire. This would allow someone to have a registrar set up that will add new contacts but never allow for them to expire. Contact expiration is a vital part of a registrar's duties. If the registrar is the only way that we foresee adding temporary contacts, then I think this set of observers belongs in the registrar code (potentially in a separate file, but still part of the registrar module). If, however, there might be some other method of adding dynamic contacts, then I suggest putting this in the res_sip core so that contacts can be guaranteed to expire no matter how they get added.
>
> Joshua Colp wrote:
> I purposely did this as a module to allow the responsibility of expiring exist on a separate machine within a cluster, for example. I felt it was either do it that way or allow it to be configurable. As it is contacts will continue to be expired, they are just done so at query time and not real time.
When you say query time, does that mean when a REGISTER arrives, or does that mean when a contact is retrieved or otherwise updated in sorcery?
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2598/#review8847
-----------------------------------------------------------
On June 6, 2013, 7:08 p.m., Joshua Colp wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2598/
> -----------------------------------------------------------
>
> (Updated June 6, 2013, 7:08 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> This change adds a stand-alone module which uses sorcery observers to delete contacts when they should expire, unless updated. This will allow persistent endpoint state to reflect reality.
>
>
> Diffs
> -----
>
> /team/group/pimp_my_sip/res/res_sip_registrar_expire.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/2598/diff/
>
>
> Testing
> -------
>
> Tweaked the code to explicitly expire contacts after 5 seconds, confirmed it happens and that structures get destroyed as expected.
>
>
> Thanks,
>
> Joshua Colp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130606/8068e36a/attachment.htm>
More information about the asterisk-dev
mailing list