On Fri, Jul 3, 2009 at 6:15 PM, Juha Heinanenjh@tutpro.com wrote:
in order to clear lots of confusion and in order to simplify things, i'm suggesting that we replace k pvars with s selects. for example, $fd would become @from.uri.host.
Actually, what if we used the @ character as delimiter for PVs? I mean SER selects and Kamailio PVs have the same purpose. This way they would complement each other. All SER selects use long verbose identifiers, while PVs use short identifiers, so the changes of conflicts are minimized.
The script writer would then know that whatever starts with @ is a special "variable" that is used to retrieve information from the SIP message, operating system, transport layer, etc...
It would also be a good starting point for future integration, we currently have many selects and PVs that are equivalent, i.e. @from.uri.host and $fd. Later we can share the implementation and the two could become aliases for to a common function. For example $fd would be written as @fd and it would do the same as @from.uri.host.
If you don't like @ then we can also try to pick a new character and migrate both, selects and PVs to a new character, such as &. This way both implementations would be equally affected.
The bottom line is that we have two alternative implementation of the same thing, they complement each other and it would help tremendously if they used the same delimiter--different from AVPs and variables.
also, $avp(name) would simply become $name.
Yes, the syntax would become shorter and the danger of conflicts would be minimized.
It's just a proposal, we ran into this issue while we were trying to unify the domain module. You can see this module as an early migration bird, I suspect the issue of conflicting identifiers will be in many other modules and we would have to tackle it somehow before we can proceed further.
Jan.