Hello,
one of the most hidden parts of openser to the config is the branch
processing.
Behind a branch is following structure:
struct branch
{
char uri[MAX_URI_SIZE];
unsigned int len;
/* Real destination of the request */
char dst_uri[MAX_URI_SIZE];
unsigned int dst_uri_len;
/* Path vector of the request */
char path[MAX_PATH_SIZE];
unsigned int path_len;
int q; /* Preference of the contact among contact within the array */
struct socket_info* force_send_socket;
unsigned int flags;
};
I am thinking in offering a fine access to this structure in
configuration file, so the admin can control much closer the branch
processing. By using while and and index, checks of the attributes in
branches could be done. By doing it in main route, one can reduce the
overload of stateful processing, by dropping a branch before going to
transaction, for example.
I am looking at something similar for user location records. Such a
record has many attributes, and from config is no way to access them
without doing a lookup and changing r-uri/branches.
There could be many benefits, for example:
- being able to detect if a user calls from a registered phone or not
- detecting how many contacts a user has at a moment
- ability to check and, eventually, drop processing before doing changes
to branches and so on...
The access will be provided via pseudo-variables, perhaps the location
records will be fetched in variables upon calling a function that gets
an AoR as parameter.
I have seen on mailing lists discussions about needs that will be solved
by this new feature. Any comments?
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com