Many thanks, this now works
The inserted command now looks like this:
lookup("aliases"); # (needed the ; at the end ot ir error'd)
# native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; };
Thanks again for you help.
-----Original Message----- From: Jan Janak [mailto:jan@iptel.org] Sent: Sunday 09 May 2004 17:54 To: steve Cc: serusers@lists.iptel.org Subject: Re: [Serusers] 400 Table 'aliases' not found in memory -- checked archives added lookup("aliases") before if (!lookup("location")) {
On 07-05 17:18, steve wrote:
Hi, Looking back in the archives I see this problem referenced
quite a lot.
My issue seems to be the same as the others in the archive:
In serweb/user_interface click on the subscribe button, fill in the details no problems.
When going to the confirmation page I see the message:
400 Table 'aliases' not found in memory, use save("aliases") or lookup("aliases") in the configuration script first
This is a snip of my config:
if (uri=~"labbox-b.noclan.lab") { lookup("aliases"); if (method=="REGISTER") { # Uncomment this
if you want
to use digest authentication if (!www_authorize("labbox-b.noclan.lab", "subscriber")) {
www_challenge("labbox-b.noclan.lab", "0");
break; }; save("location"); break; };
Better put lookup("aliases") here.
# native SIP destinations are handled using
our USRLOC DB
if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; };
I have tried this config in variations:
if (uri=="myself") { lookup("aliases");
if (uri=~"labbox-b.noclan.lab") { lookup("aliases")
if (uri=~"labbox-b.noclan.lab") { lookup("aliases");
I have also tried adding the save("aliases") but this does
not seem to
be referenced as much as lookup("aliases");
This does not matter actually -- you should get rid of the error message if you put lookup("aliases") anywhere in the configuration file. To make it work properly you should put it just before lookup("location");
Is this a simple syntax issue? Ser starts ok using any of
the config
variations.
I will attach the full ser.cfg in case I have made errors
else where
in the file.
Interestingly this seems to be a precursor for the error
"error in SQL
query, line: 43" that people see. The reason for this is
that the user
is added to the subscriber table, but is not removed from
pending, so
when you re-try you have a duplicate in the subscriber
table and this
I think is what generates the error.
That's possible, in this case simply remove the line from pending table -- the account should be activated already if it is in subscriber table.
Jan.
This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it