A UA is trying to send NOTIFY:
U 1.2.3.4:56839 -> 5.6.7.8:5060 NOTIFY sip:machine.foo.com SIP/2.0. Via: SIP/2.0/UDP 1.2.3.4:56839;branch=z9hG4bK-ee80efbb. From: TPA - PSTN sip:9876@machine.foo.com;tag=ddf83b1b7d0b3b06o1. To: sip:machine.foo.com. Call-ID: e368f273-a2f62b8e@192.168.251.10. CSeq: 31511 NOTIFY. Max-Forwards: 70. Event: keep-alive. User-Agent: Sipura/SPA3000-2.0.13(GWg). Content-Length: 0.
The reponse is:
U 5.6.7.8:5060 -> 1.2.3.4:56839 SIP/2.0 404 User Not Found - lookup_location. Via: SIP/2.0/UDP 1.2.3.4:56839;branch=z9hG4bK-ee80efbb. From: TPA - PSTN sip:9876@machine.foo.com;tag=ddf83b1b7d0b3b06o1. To: sip:machine.foo.com;tag=efa044f399b3f75e8ec9d81a905f914f.d18f. Call-ID: e368f273-a2f62b8e@192.168.251.10. CSeq: 31511 NOTIFY. Server: Sip EXpress router (0.9.7-pre1 (i386/freebsd)). Content-Length: 0. Warning: 392 5.6.7.8:5060 "Noisy feedback tells: pid=15425 req_src_ip=1.2.3.4 req_src_port=56839 in_uri=sip:machine.foo.com out_uri=sip:machine.foo.com via_cnt==1".
From the logs we see among other things:
Feb 25 08:09:13 machine /usr/local/sbin/ser[15425]: lookup(): '' Not found in usrloc
Can anyone tell me why the user is not found ?
Any help here is greatly appreciated
-kim
-- w8hdkim@gmail.com
Kim Culhan wrote:
There is no user in this NOTIFY message. So there is nothing that SER can lookup. This is probably just a keep-alive.
On 2/25/06, Andres andres@telesip.net wrote:
Yes I think it is just a keep-alive.
Thanks also to "Michal Matyska" michal@iptel.org who wrote:
Hmmm, could you tell me from the message dump, which user do you want to lookup?
This is what I don't understand, where is the user name located ?
What alternative action is there be if you have:
if (!lookup("location")) { sl_send_reply("404", "User Not Found - lookup_location"); break; };
So, what causes the lookup in userloc db to fail ?
As Michal points out, for a keep-alive message like this one there is no user in the usrloc dbso it must return a 404 error ?
Is the UA sending the keep-alive doing the wrong thing ?
-kim
-- w8hdkim@gmail.com
The 404 message is harmless. But if you don't like it, you can insert the following code snippet before the user lookup:
if (method == "NOTIFY"){ sl_send_reply("200", "OK"); break; };
On Sat, 25 Feb 2006 11:48:38 -0500, Kim Culhan wrote
Is this a Snom phone by any chance? I know they use NOTIFY messages as a keep-alive, although a few others do as well. In my config, I have a section to handle just that:
if((method=="NOTIFY") && search("^Event: keep-alive")) { sl_send_reply("200", "OK"); break; };
On Saturday 25 February 2006 20:58, sip wrote:
On Sat, 25 Feb 2006 11:48:38 -0500, Kim Culhan wrote
Is the UA sending the keep-alive doing the wrong thing ?
No. Sending NOTIFY's instead of empty packets is maybe a waste of bandwith but it is nothing wrong in sending any SIP request for keep alive purposes.
From Kim's original mail you can see that it is a Sipura phone which sends the NOTIFY's. I'm very doubtfull about Snom phones using NOTIFY's for keep alive purposes, because they send empty packet (4 bytes) for keep alive.
Greetings Nils
On Sat, 25 Feb 2006 21:30:53 +0100, Nils Ohlmeier wrote
I've got a Snom 200 that sends a NOTIFY for keep-alive. It's running an OLD version of the Snom firmware, though, so I can maintain some for compatibility testing with some of our old business clients.
It always kind of bothered me that it would send a whole message, but whatever. I don't write the code. ;)
N.
On Sat, February 25, 2006 2:58 pm, sip said:
This is a Sipura SPA-841 with NAT Keep Alive Enable: set to YES
It sends a NOTIFY about every 10 seconds where the replies are:
SIP/2.0 404 User Not Found
Adding the above test for NOTIFY and keep-alive to features-callfwd.cfg 15 2005-09-15:
# ----------------------------------------------------------------- # Call Type Processing Section # ----------------------------------------------------------------- if (!is_uri_host_local()) { if (is_from_local() || allow_trusted()) { route(4); route(1); } else { sl_send_reply("403", "Forbidden"); }; break; };
if((method=="NOTIFY") && search("^Event: keep-alive")) { sl_send_reply("200", "OK"); break; } else if (method=="CANCEL") { route(1); break;
Results in sending: SIP/2.0 200 OK to the Sipura.
regards -kim
-- w8hdkim er gmail.com