Hi Iñaki,
my consideration on 404/480 responses comes both from RFC 3261 and from
the RFC 3398 (Integrated Services Digital Network (ISDN) User Part
(ISUP) to Session Initiation Protocol (SIP) Mapping)
ISUP Cause value SIP response
---------------- ------------
1 unallocated number 404 Not Found
2 no route to network 404 Not found
3 no route to destination 404 Not found
19 no answer from the user 480 Temporarily unavailable
20 subscriber absent 480 Temporarily unavailable
Anyway it seems that the best practise is to send 404 both cases, but I
prefer to distinguish this two situatations.
Cosimo Fadda
Iñaki Baz Castillo ha scritto:
El Wednesday 05 March 2008 11:04:04 Iñaki Baz Castillo
escribió:
Why then every body suggest to reply "404
Not Found" when
"lookup(location)" returns -1? For example, the "registrar" module
doc
suggests it:
Example 1-22. lookup usage
lookup("location");
switch ($?) {
case -1:
case -3:
sl_send_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Not Found");
exit;
};
IMHO it should be:
if ( ! does_uri_exist()) {
## User doesn't exit here.
sl_send_reply("404", "Not Found");
exit;
}
if ( ! lookup("location")) {
## User does exist, but it not registered now.
sl_send_reply("480", "Not Available Now");
exit;
}
--
*Ing. Cosimo Fadda
System Engineer
Klarya s.r.l.*
**
__________________________________________________