[Users] I need save("location") but with some change ...
Klaus Darilion
klaus.mailinglists at pernau.at
Tue Mar 27 10:24:06 CEST 2007
Bodin Bruno wrote:
> Hello,
> I currently use this code :
>
> if (is_method("REGISTER"))
> {
> if (!radius_www_authorize("mydomain"))
> {
> www_challenge("mydomain", "0");
> exit;
> };
> xlog("new user : $au");
> save("location")) ;
> exit;
> };
>
> But save function add a new item in location table with these param :
> Username, domain, contact ....user_agent, socket, methods.
>
> Username use by register module isn't Authentification's username how
> can I change it ?
You can not change it. The uri in To: header is used. But you can make
sure that the To: uri username and the authentication username are
identically by using check_to().
> Is it possible to add more location for a user ? ( Like username and
> numer phone )
The location table stores the contact of registered clients. Thus, this
is rather dynamic data and maps a public SIP URI to the ip:port where
the client can be reached.
Username: The username IS already in the location table
phone number: Usually a phone number maps to a user, not to a contact.
Thus, this additional data is usually stored in the subscriber table
(e.g. use the rpid column (remote-party-id=user's phone number) or add
other columns you need).
regards
klaus
>
> Thank for your help.
>
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list