El Thursday 15 November 2007 15:17:36 Daniel escribió:
Thanks.
But I don't understand the use of aliases table.
I have defined some subscriber users, with username (like BOB) and password
(BOBPWD). So, if I wanted to access the system, I would send a REGISTER
message with correct username and password (authorization required). Then
my proxy address will be "sip:BOB@IP_PROXY" and my Contact will be
"sip:BOB@MY _IP_ADRRESS".
These information are saved into USER LOCATION table (save("location")
function).
Now, through DB_aliases module and dbaliases table, I can define some
aliases for BOB (like "sip:1234@IP_PROXY", etc...), so if an INVITE for bob
has "sip:1234@IP_PROXY" as R-URI, with db_aliases_lookup() function I can
rewrite R-URI with Bob's URI ("bob@IP_PROXY") and then call the
lookup("location") function.
But I don't understand how I can use the ALIASES table.
Are there any example explaining its use ?
If you use DB_ALIASES module you don't need ALIASES table at all.
ALIASES table is other way of implement aliases, just it.
For example:
* alias with DB_ALIASES module:
table dbaliases:
alias_username: 1234
alias_domain: IP_PROXY
username: bob
domain: IP_PROXY
db_aliases_lookup() will rewrite URI when it's 1234@IP_PROXY and it'll become
bob@IP_PROXY
Later lookup("location") will look for the contact of that AOR.
* alias with ALIASES table:
table aliases:
username: 1234
domain: IP_PROXY
contact: sip:bob@IP_PROXY
lookup("aliases") will rewrite URI when it's 1234@IP_PROXY and it'll
become
bob@IP_PROXY
Later lookup("location") will look for the contact of that AOR.
ok now?
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es