[asterisk-dev] [Code Review] 3648: RLS: Resource list configuration

Matt Jordan reviewboard at asterisk.org
Thu Jun 19 13:50:37 CDT 2014



> On June 19, 2014, 1:12 p.m., Matt Jordan wrote:
> > /team/group/rls/res/res_pjsip_pubsub.c, lines 2087-2088
> > <https://reviewboard.asterisk.org/r/3648/diff/1/?file=59859#file59859line2087>
> >
> >     You may want to provide a min/max range for this option. Otherwise, someone may provide a notification_batch_interval of 1 (thinking it is 1 second) and end up with a batch interval of 1 ms.
> 
> Mark Michelson wrote:
>     That won't work here since 0 is used to indicate not to batch notifications. I can't provide a compound range to the config framework (e.g. i == 0 || 1000 < i < 10000). The best I can do to prevent the misunderstanding you mention is to change the name of the option so that it has the units in the name. notification_batch_ms, for instance. What do you say to that?

Well... that does take us out of line with other, similar options. If we can't use the built in mechanisms to prevent this, then I'd punt - it probably isn't worth it (and the documentation is good).


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3648/#review12217
-----------------------------------------------------------


On June 19, 2014, 10:45 a.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3648/
> -----------------------------------------------------------
> 
> (Updated June 19, 2014, 10:45 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23866
>     https://issues.asterisk.org/jira/browse/ASTERISK-23866
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Use https://wiki.asterisk.org/wiki/display/AST/Resource+List+Configuration as a guide for how RLS configuration was devised. The code on this review does not stray from that design. Note that most edge cases are not addressed at configuration time, but rather when a subscription is attempted to be established. The only edge case handled in this review is duplicated list items in a resource list.
> 
> I also added an AMI PJSIPShowResourceLists command to list details of configured lists.
> 
> 
> Diffs
> -----
> 
>   /team/group/rls/res/res_pjsip_pubsub.c 416666 
> 
> Diff: https://reviewboard.asterisk.org/r/3648/diff/
> 
> 
> Testing
> -------
> 
> I created the following resource list in pjsip.conf
> 
> [mylist]
> type=resource_list
> event=message-summary
> list_item=foo
> list_item=bar,baz
> list_item=foo
> full_state=yes
> notification_batch_interval=5000
> 
> I ensured that I saw a warning message about ignoring the duplicated "foo" list item. I then ran PJSIPShowResourceLists and got the following output:
> 
> Response: Success
> EventList: start
> Message: A listing of resource lists follows, presented as ResourceListDetail events
> 
> Event: ResourceListDetail
> ObjectType: resource_list
> ObjectName: mylist
> Event: message-summary
> ListItem: foo,bar,baz
> NotificationBatchInterval: 5000
> FullState: false
> 
> Event: ResourceListDetailComplete
> EventList: Complete
> ListItems: 1
> 
> 
> All seems well to me.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140619/63472965/attachment-0001.html>


More information about the asterisk-dev mailing list