[OpenSER-Users] "user not found" and "user not exist"

Iñaki Baz Castillo ibc at in.ilimit.es
Mon Mar 10 11:13:25 CET 2008


El Monday 10 March 2008 11:11:26 Amit Vijayvargiya escribió:
> Hi,
>
>     Thanks for your reply,
>
>     i am agree with you people we have to send 480 when user not found.
>     what changes i have to do in openser.cfg for that
>
>     currently i am using
>
>     if (!lookup("location")) {
>                 switch ($retcode) {
>                         case -1:
>                         case -3:
>                                 t_newtran();
>                                 t_reply("404", "Not Found");
>                                 exit;
>                         case -2:
>                                 sl_send_reply("405", "Method Not
> Allowed");
>                                 exit;
>                 }
>         }
> 

> 
>
>
> 
>
>
> 

>
> 
> V
> 

>
> '

> 
> T

> PL

> 0
> !
>
>     in above we only look into location table. so here we have to reply
>         t_reply("480", "Temporarily Unavailable");
>
>     but now how we can check that user not in the domain so we reply 404


First use "does_uri_exist" to check if the called AoR is in fact an existing 
subscriber in your system, if not reply a 404:

	if (!does_uri_exist()) {
		 t_reply("404", "User doesn't exist here");
		exit;
	}

 After that do the "lookup" and reply 480 if the user is not registered:

    if (!lookup("location")) {
          switch ($retcode) {
              case -1:
              case -3:
                 t_newtran();
                 t_reply("480", "Not Available");
                 exit;
              case -2:
                  sl_send_reply("405", "Method Not Allowed");
                  exit;
    }


-- 
Iñaki Baz Castillo
ibc at in.ilimit.es




More information about the Users mailing list