Hi Alex,
I don't know your complete architecture, but let me ask you why Asterisk is not a trusted gateway? The you can use rewritehost or LCR logic to route DIDs to Asterisk If you need to associate users with DIDs, you can use dbaliases.
Cheers,
Gustavo On Tue, Aug 5, 2008 at 8:55 PM, Alex Balashov abalashov@evaristesys.comwrote:
Greetings,
I've got a small problem with how registration lookups work.
I have several concurrent registrations from one PBX that have multiple contact URIs that they declare that aren't the same; they contain the DIDs to route a call to. So, for instance, in Asterisk:
register => user:pass@registrar/DID1 register => user:pass@registrar/DID2
Of course, lookup() doesn't care what those contacts actually are. If it sees multiple contacts for one username, t_relay() will simply create branches for all of them and and ring them all. I can't actually have that happen.
I'm looking for suggestions on how to handle this most elegantly. The two options I've got in mind are:
- Stop using lookup() and do my own URI rewrites and branch forking (if
the contact URIs are identical) with attention to the contact.
- Use BRANCH-ROUTEs to arrest the call leg if it is going to an RURI
user part that does not match the user part of the contact URI, and... drop() the branches?
I also need to build in some other logic, such that for example if a user has only one contact registered and it does not match the DID, or none of the contacts match the DID, proceed as normal anyway.
Is it possible there is a better way? Recommendations welcome.
Cheers,
-- Alex
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users