[Serdev] Path support
Michal Matyska
michal at iptel.org
Thu Dec 7 16:45:32 UTC 2006
On Tue, 2006-12-05 at 20:45 +0100, Bogdan Pintea wrote:
>
> Michal Matyska wrote:
> > no need for specific support, textops selects are enough:
> > @hf_value.path
>
> Indeed this works. I also overlooked the textops' selects.
>
>
> > or if you want be more strict
> > @hf_value.path[*].uri
> >
> `@hf_value.path.uri' works as well (collecting all uri's in 'Path' HFs),
> but not the version with star. Which is strange, considering that this
> `*' example also appears in textops doc, but (again) the 'select_param'
> non-terminal definition in cfg.y seems to clearly disagree with this
> syntax. Are you using the notation as a shortcut, or is it there really
> a discrepancy?
The cfg.y allows string inside the square brackets, so it should read
@hf_value.path["*"] - this select is accepted by the head version.
@hf_value.path["*"].uri is not accepted, we have to check if it is due
to intetion or bug
> But speaking of select syntax and Path extension, the first Path value
> might have to be used by a registrar proxy for routing upstream;
> optimally, it might need special treatment, like detaching it from the
> group (to avoid storing it twice). So, there might be the need of only
> select addressing a subset (just like [1:] in python's [a:b] notation).
There is possibility to do it using eval module and its selects...
direct adressing would be indeed faster than processing the all-uris
string to get substring from it.
> > The contact select supports at the moment just the first contact, so the
> > construction like @contact[1] is not valid. I tried to dig through the
> > files, logs and docs (grep -r contact\[1\] :-) and nothing was found.
> > What "documentation" do you reffer to, so it could be updated?
> >
>
> http://www.iptel.org/attribute_value_pairs_and_selects
>
Ok, I see... it is the only place where @contact[1] is mentioned.
Michal
More information about the Serdev
mailing list