Stefan,
<br />
<br />If I understand you correctly you are talking about the following scenario
<br />
<br />someone calls 55555 and when it comes into the OpenSIPS server the domain gets replaced with sip.mydomain or mydomain.net. The true domain for 55555 is something like 55555@fivefives.com. So if you want to send the call to Asterisk so that someone can leave 55555@fivefives.com a voicemail you need to be able to change the domain to @fivefives.com instead of sip.mydomain or whatever else the domain might be when it comes in.
<br />
<br />If that is the scenario you are talking about then you can do this (This is what I do).
<br />
<br />When I create subscribers I do the following
<br />opensipsctl alias_db add 55555@fivefives.com 55555@fivefives.com
<br />
<br />Then in the OpenSIPS config do the following
<br />alias_db_lookup("dbaliases" , "d");
<br />
<br />With the function above OpenSIPS will look in the dbaliases database table for a username "55555" and ignore the current domain attached to that user and if the username is found in the dbaliases table the current domain on the uri will get replaced with the one in the dbaliases table.
<br />
<br />Hope that is what you are wanting.
<br />
<br />
<br />On May 24, 2011 8:32am, Stefan Sayer <stefan.sayer@googlemail.com> wrote:
<br />> Hello,
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> in a typical OpenSIPS 1.6.* home proxy type of setup (i.e. where you have opensips as registrar and home proxy) with aliases and multi-domain support, e.g. the one from the default opensips.cfg, is there a way to determine the 'canonical' domain and user ID, which is properly the same for a user in all cases, e.g. when sending to voicemail?
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> I know there's e.g. $rd, but if my proxy listens on sip.mydomain.and mydomain.net, then that may be either of them, or it may be the IP address.
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> The only proper solution that comes to my mind is to set a user preference (which would be like the primary key as afterthought...well we know the history). But I guess that this is a recurring issue for many things (aaa etc), so there should be a better solution i suppose.
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> Thanks!
<br />>
<br />>
<br />> Stefan
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />>
<br />> _______________________________________________
<br />>
<br />>
<br />> Users mailing list
<br />>
<br />>
<br />> Users@lists.opensips.org
<br />>
<br />>
<br />> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
<br />>
<br />>
<br />>