[Users] Error Handling with Parallel Forking
Chris Heiser
cheiser at config.name
Fri Feb 23 01:18:21 CET 2007
Hello gurus,
I'm attempting to do some rather crazy parallel forking and have found a
few issues I'm hoping to solve. I thought I'd solicit some advice from
the experts.
Some background:
Each device registers with its own unique information. No two devices
share the same credentials. Since a random user might want their number
sent to multiple phones, and maybe even a cell phone, I've done the
following:
if(method=="INVITE" && !isflagset(5))
{
if(avp_db_load("$ru/username","fork"))
{
t_on_branch("1");
avp_pushto("$ru/username","$avp(s:fork)/g");
};
};
Then the branch route looks like:
branch_route[1]
{
setflag(5);
route(3);
}
The idea here is the fork avp contains one or more possible destinations,
but we don't store a complete URI here. The branch route sends us back
through the normal routing logic to lookup local users on the system, and
maybe route something to an external PSTN gateway, or another proxy.
The problem:
I haven't found a way to gracefully handle the event when one of the
possible destinations is a device that hasn't registered. Say we allow
the user to have a soft client, so we add the username to the list of fork
avps. If the device isn't registered, I have 2 options:
1) Use a default route
2) Detect that I should know who this is, and error out
Either way, an error is produced, but I don't see a good way of detecting
if we should push the 404, or generate a 404 back to the client. The
polite method would be:
Are there other branches still going?
If yes, just exit this branch
If no, relay, or generate an error back to the client
So my question is how to do this last part. Am I crazy for even thinking
about doing this in OpenSER? BTW, I'm using v1.1.1
--Chris
More information about the Users
mailing list