[Serusers] Checking for unregistered user

Luke Gasteiger luke at vianet.ca
Sat Mar 29 15:27:15 CET 2003


Hello

Is there a built in function that can check to see if a user exists (not
registered). I have a need to send different error codes depending on
whether a phone number is unallocated or it is allocated but not
registered. What I require is this

if (!lookup("location")) {
  if (user does not exist) {
    sl_send_reply ("604", "Does not exist anywhere");
    break;
  }
  else {
    sl_send_reply ("404", "Not Found");
    break;
  };
};

if (!t_relay()) {
  sl_reply_error();
};


Thanks
Luke






More information about the sr-users mailing list