In some cases, you want to allow a user to have several addresses, such as the phone number associated to a main address. You can use aliases for this purpose.
You can add an alias as follows:
#opensipsctl alias_db add [email protected] [email protected]
The output for the preceding command is as follows:
database engine 'MYSQL' loaded Control engine 'FIFO' loaded MySql password for user 'opensips@localhost':
There are two different implementations of the alias functionality. The first one is the alias database. In this modality, you use the function, lookup("aliases")
. This function goes to the aliases table, checks the existence of the alias, and replaces the RURI with the canonical form of the alias. Recently, a new module called ALIAS_DB
has been created as an alternative for the user aliases via usrloc
. The main feature is that it does not store all the adjacent data for the user location and always uses a database to search; it does not use memory caching and thus is...