[Serusers] lookup(): '' Not found in usrloc
Kim Culhan
w8hdkim at gmail.com
Sun Feb 26 14:50:07 CET 2006
On Sat, February 25, 2006 2:58 pm, sip said:
> On Sat, 25 Feb 2006 11:48:38 -0500, Kim Culhan wrote
>
>> On 2/25/06, Andres <andres at telesip.net> wrote:
>>
>>> Kim Culhan wrote:
>>>
>>>
>>>> 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.
>>>>
>>>>
>>>>
>>> There is no user in this NOTIFY message. So there is nothing that
>>> SER
>>> can lookup. This is probably just a keep-alive.
>>
>> Yes I think it is just a keep-alive.
>>
>>
>> Thanks also to "Michal Matyska" <michal at 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
>>
>>
>
>
> 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; };
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
More information about the sr-users
mailing list