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