output from getList:
- Code: Select all
{
"call_through" : {
"internal" : {}
},
"priority" : "48",
"name" : "0048 1900call9or1x",
"description" : "20120313",
"failovers" : {},
"is_final" : "1",
"pattern" : "Begins with (9|1)900 and the remainder is 7 digits in length.",
"id" : "1998",
"context_type" : "USER"
}
Output from getInfo:
- Code: Select all
{
"call_through" : {
"internal" : {}
},
"priority" : "48",
"pattern_prepend" : "850",
"dependents" : {},
"pattern_max" : "7",
"name" : "0048 1900call9or1x",
"pattern_min" : "7",
"pattern_begin" : "(9|1)900",
"description" : "20120313",
"pattern_trim" : "11",
"failovers" : {},
"is_final" : "1",
"context_type" : "USER",
"id" : "1998"
}
Currently to check if the rules we have are equal to the new rules we're generating, I have to get the list, then iterate over the list by priority and get the id numbers for each rule, then loop through those calling .getInfo. From .getInfo I then compare the name, pattern_begin, pattern_max, etc with the rule I'm adding to see if it already exists.
I would like the fields from get Info to show up in the response from getList, or a flag added that gives you either the string or the broken out fields. I do not want to have to parse out the string when updating call rules.
Thanks.
