[Serusers] lookup_contacts() error after sd_lookup() from the speeddial mo dule- latest cvs ottendorf
Michal Matyska
michal at iptel.org
Fri Feb 23 21:08:23 CET 2007
> > Ok I checked it and I think here is the problem!!:)
> > The registration procedure and the invocation of the
> > save_contacts("location") gives probably improper record because
> > the uid column contains only the user name part of the sip uri without the '@domain' part. So this is probably a bug in the save_contacts() function.
> > That is why lookup_contacts didn't find the user. When I changed it manually
> > by adding the domain part to the value in the uid column it worked (with lookup_user("$tu.uid",""@ruri") as well as speeddial stuff) !! Strange that it somehow worked with "$t.uid".
> >
> > What do you suggest to do to make it work??
> >
> > contents of the location table:
> >
> > mysql> select uid,aor,contact from location;
> > +-------+---------------------------+--------------------------------------------------------+
> > | uid | aor | contact |
> > +-------+---------------------------+--------------------------------------------------------+
> > | tomix | sip:tomix at tezet.no-ip.org | sip:tomix at 192.168.1.2:7060 |
> > | misia | sip:misia at tezet.no-ip.org | sip:misia at 192.168.1.10:4532;rinstance=87be1b88955eac60 |
> > +-------+---------------------------+--------------------------------------------------------+
> >
> One more remark. The credentials table contains the correct value of the uid:
> mysql> select auth_username,did,uid,realm from credentials;
> +---------------+-----------------+-------------------------+-----------------+
> | auth_username | did | uid | realm |
> +---------------+-----------------+-------------------------+-----------------+
> | tomix | tezet.no-ip.org | tomix at tezet.no-ip.org | tezet.no-ip.org |
> | hellboy | tezet.no-ip.org | hellboy at tezet.no-ip.org | tezet.no-ip.org |
> | admin | tezet.no-ip.org | admin at tezet.no-ip.org | tezet.no-ip.org |
> | misia | tezet.no-ip.org | misia at tezet.no-ip.org | tezet.no-ip.org |
> | testser | tezet.no-ip.org | testser at tezet.no-ip.org | tezet.no-ip.org |
> +---------------+-----------------+-------------------------+-----------------+
>
> Perhaps the save contacts insert the auth_username value instead of uid into the
> location table??
The authorization code loads extra attributes from the database (using
authdb module it is just uid). Please, set debug=4 and check the
output... it should contain line containing auth_db:generate_avps: set
string AVP 'uid=....'
Michal
More information about the sr-users
mailing list