[OpenSIPS-Users] 'canonical' domain / user ID

duane.larson at gmail.com duane.larson at gmail.com
Tue May 24 16:17:26 CEST 2011


If I understand you correctly you are talking about the following scenario

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 at fivefives.com. So if you want to send the call to  
Asterisk so that someone can leave 55555 at 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.

If that is the scenario you are talking about then you can do this (This is  
what I do).

When I create subscribers I do the following
opensipsctl alias_db add 55555 at fivefives.com 55555 at fivefives.com

Then in the OpenSIPS config do the following
alias_db_lookup("dbaliases" , "d");

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.

Hope that is what you are wanting.

On May 24, 2011 8:32am, Stefan Sayer <stefan.sayer at googlemail.com> wrote:
> Hello,

> in a typical OpenSIPS 1.6.* home proxy type of setup (ie where you have  
> opensips as registrar and home proxy) with aliases and multi-domain  
> support, eg 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, eg when sending to voicemail?

> I know there's eg $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.

> 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.

> Thanks!

> Stefan

> _______________________________________________

> Users mailing list

> Users at lists.opensips.org

> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110524/415641ed/attachment.htm>

More information about the Users mailing list