[Serusers] offline users vs. non-existant

Dave Bath dave at fuuz.com
Thu Jul 29 17:53:23 CEST 2004


Hey everyone, 

 

I'm trying to work out how to recognise whether a user is offline or
just doesn't exist. 

 

I have this snippet of code ... 

 

if (!lookup("location")) {

 

<snip>          

 

   if ((method=="INVITE" || method=="ACK") && t_newtran() ) {

                    t_reply("404", "Not Found");

                    # Put an entry in the database

                    acc_db_request("404 Not Found","missed_calls");

                    break;

                  } else {

                    # all other requests to off-line users are simply
replied

                    # statelessly and no reports are issued

                    sl_send_reply("404", "Not Found");

                    break;

                  };

 

However, I don't think it's right.. as I don't see under what situations
I will reach the else statement...  No matter whether I call an offline
user or a non-existent user I always get a 404 Not Found and an entry is
stored in the database... 

 

This is not ideal - I'd like to be able to differentiate between an
offline and a non-existent user..

 

Can anyone help me on this please?

 

Many thanks in advance,

 

D

 

 

-------------------------------------
Dave Bath
dave at fuuz.com
www.fuuz.com
07736 232085

NOTE: The information contained in this email is intended for the named
recipients only, it may be privileged and confidential. If you are not
the intended recipient, you must not copy distribute or take any action
in reliance upon it. No warranties or assurances are made in relation to
the safety and content of this email and any attachments. No liability
is accepted for any consequences arising from it

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040729/18e01bbc/attachment.htm>


More information about the sr-users mailing list