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

Mark Michelson reviewboard at asterisk.org
Thu Jun 19 17:47:21 CDT 2014



> On June 19, 2014, 9:37 p.m., Matt Jordan wrote:
> > /team/group/rls/res/res_pjsip_pubsub.c, lines 2085-2086
> > <https://reviewboard.asterisk.org/r/3648/diff/2/?file=59946#file59946line2085>
> >
> >     I'm not sure if it will end up mattering, but if event is less than the size of the char array (32) the default handler function chararray_handler_fn in config_options.c silently truncates the value.
> >     
> >     I would also imagine that the event package cannot be the empty string, so the flags option here should probably be a 1.
> >     
> >

I don't think the 32 character limit will be a problem. I'll change the flag though. I'll also add a handler that will reject the configuration if there is no event specified or no list_items.


- Mark


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


On June 19, 2014, 9 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3648/
> -----------------------------------------------------------
> 
> (Updated June 19, 2014, 9 p.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 416800 
> 
> 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/25d43644/attachment.html>


More information about the asterisk-dev mailing list