[OpenSIPS-Users] Understanding aliases core parameter versus domain module

Gregory Massel greg at switchtel.co.za
Wed May 21 15:05:05 UTC 2025


Hello all

I'm trying to understand whether it is necessary to have a core "alias" 
parameter for every name by which the OpenSIPS server is known or if 
it's adequate to simple list these in the table that the domain module 
reads?

At present I have something similar to:

socket=udp:1.2.3.4:5060

alias=udp:host1.domain.com:5060
alias=udp:host2.domain2.com:5060
alias=udp:host3.domain3.com:5060

loadmodule "domain.so"
modparam("domain", "db_url", "mysql://opensips:password@localhost/opensips")
modparam("domain", "db_mode", 1)

With all three of the domains associated with the aliases (i.e. 
excluding protocol and port) also included in the 'domain' table in the 
database.

An "opensips-cli -x mi domain_reload" is an extremely quick and 
non-disruptive way to add an additional domain to a live system, 
however, adding an alias to opensips.cfg and restarting OpenSIPS is, by 
contrast, a relatively slow and disruptive process (at least on versions 
< 3.6 where, to the best of my understanding, an "opensips-cli -x mi 
reload_routes" won't reload the aliases.)

When I add a domain to the domains table, all appears to work correctly, 
so I'm not seeing any specific reason why I need the aliases, however, 
don't want to find out abruptly when something breaks.

Are there specific circumstances in which, if one only adds the domain 
to the domains table, and doesn't add an "alias=" to the core 
configuration, it will break? Is it necessary to have an alias for every 
domain, or only the primary hostname?

Thanks

Greg




More information about the Users mailing list