[Serusers] Not found in usrloc

Klaus Darilion klaus.mailinglists at pernau.at
Tue May 2 19:55:15 CEST 2006


Hi!

Do you want to map from the canoncial username to the alias? Then 
lookup("aliases") is the wrong way, as it maps from alias to the 
canoncial username.

For this there are at least 2 fixes:
A) create another table aliases_reverse, which maps in the other 
direction. then use lookup("aliases_reverse") in failure route. or

B) make 884 the canonical username and davor at ... the alias.


You can also make other solutions with AVPs which are loaded from the 
preferences table of the called user, ....


regards
klaus

davor jovanovic wrote:
> Hi Klaus,
> 
> i'll try with AVP.
> 
> About my scenario: what I want to do is, when user 
> "sip:djovanovic at srce.hr" is looged in but doesn't answer the call, I 
> want to use his alias "884" which I rewrite with IP address 
> (xxx.xxx.xxx.xxx) of Cisco GW ("sip:884 at xxx.xxx.xxx.xxx" ) and GW 
> forward this call to PBX (local number 884).
> 
> Thank you for your reply.
> 
> 
> davor
> 
> 
> 
> Klaus Darilion wrote:
> 
>> Hi Davor!
>>
>> Not sure what your scenario is. Usually, the voicemail id will be the 
>> "canonical" SIP URI, in my case sip:klaus.darilion at mydomain
>>
>> I have also aliases like sip:klaus at mydomain which maps to 
>> sip:klaus.darilion at mydomain.
>>
>> If you do it the same way, then the config is fine.
>>
>> In your case the lookup("aliases") does not hit.
>>
>> Usually I:
>> - write the canonical SIP URI (after lookup("aliases") but before 
>> lookup("location") ) into an AVP
>> - use this AVP in failure route. e.g. set the RURI to this AVP
>> - to avoid rewriting the domain part (you will loose the domain info, 
>> bad in multi domain setups) push the URI of the voicemail server in 
>> the destination URI (avp_pushto, send to voicemal but do net rewrite 
>> the request URI)
>>
>> regards
>> klaus
>>
>> PS: CC to the list
>>
>> davor jovanovic wrote:
>>
>>> Hi Klaus,
>>>
>>> first of all I want to thank you for your reply. I was on some 
>>> business trip last two weeks so I wasn't able to thank you for reply 
>>> and try "revert_uri" function. I try it today but still is the same, 
>>> I keep getting "not found in usrloc" for user that is in "location" 
>>> table and for his alias. I can call user by his username and alias so 
>>> I believe that alias is correctly added to MySQL, but can not rewrite 
>>> username with alias and forward it to PBX.
>>>
>>> I have put ser.cfg and debug log in attachment, and if you be so kind 
>>> when you find time to make a quick look I would be very grateful. 
>>> This ser.cfg is my testing configuration and is basic. If I need to 
>>> provide some more outputs please let me know.
>>>
>>> Thank you very much !!!
>>>
>>>
>>> davor
>>>
>>> Klaus Darilion wrote:
>>>
>>>> The second lookup does not work, as the first lookup changes the 
>>>> request
>>>> URI. Try revert_uri(); in failure route, just before the lookup().
>>>>
>>>> klaus
>>>>
>>>>
>>>> On Fri, April 14, 2006 11:29, davor jovanovic said:
>>>>  
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a problem with using aliases when user doesn't answer the call
>>>>> (408, request timeout). for this I'm using failure_route[1]. After 
>>>>> 20sec
>>>>> when user doesn't answer the call, call comes in failure_route and 
>>>>> it is
>>>>> recognizes as 408, but when I want to rewrite URI with alias "884" 
>>>>> I get
>>>>> "Not found in usrloc", but as you can see from the output of 
>>>>> "serctl ul
>>>>> show" user is in both tables (location and aliases). Can somebody help
>>>>> because I don't know what I'm doing wrong.
>>>>>
>>>>> Thanks a lot
>>>>>
>>>>> davor
>>>>>
>>>>> *******************************************
>>>>> failure_route[1]{
>>>>>         if(t_check_status("408")){
>>>>>                 log("LOG:entered failure route 1 on code 408\n");
>>>>>                 lookup("aliases");
>>>>>                 rewritehostport("161.53.2.235:5060");
>>>>>                 t_relay();
>>>>>         }
>>>>> }
>>>>>
>>>>> ********************************************
>>>>> 1(22439) ->>>>>>>>> T_code=180, new_code=408
>>>>>  1(22439) DEBUG: t_check: msg id=2 global id=2 T start=0x40460708
>>>>>  1(22439) DEBUG: t_check: T already found!
>>>>>  1(22439) DEBUG:t_check_status: checked status is <408>
>>>>>  1(22439) LOG:entered failure route 1 on code 408
>>>>>  1(22439) lookup(): 'djovanovic' Not found in usrloc
>>>>>  1(22439) ERROR: t_forward_nonack: no branched for forwarding
>>>>>  1(22439) ERROR: w_t_relay (failure mode): forwarding failed
>>>>>
>>>>> ********************************************
>>>>> serctl ul show
>>>>>
>>>>> domain: 'location'
>>>>> aor   : 'djovanovic'
>>>>> ~~~Contact(0x404604a8)~~~
>>>>> domain    : 'location'
>>>>> aor       : 'djovanovic'
>>>>> Contact   : 'sip:djovanovic at 161.53.0.77:5060'
>>>>> Expires   : 429
>>>>> q         :
>>>>> Call-ID   : '40C79AFEA5C644ADB6FEA320F247C793 at sipgw.srce.hr'
>>>>> CSeq      : 52664
>>>>>
>>>>>
>>>>>
>>>>> ...Record(0x4045e238)...
>>>>> domain: 'aliases'
>>>>> aor   : '884'
>>>>> ~~~Contact(0x4045e298)~~~
>>>>> domain    : 'aliases'
>>>>> aor       : '884'
>>>>> Contact   : 'sip:djovanovic at sipgw.srce.hr'
>>>>> Expires   : Permanent
>>>>> q         : 1
>>>>> Call-ID   :
>>>>> 'The-Answer-To-The-Ultimate-Question-Of-Life-Universe-And-Everything'
>>>>>
>>>>> _______________________________________________
>>>>> Serusers mailing list
>>>>> serusers at lists.iptel.org
>>>>> http://lists.iptel.org/mailman/listinfo/serusers
>>>>>
>>>>>     
>>>>
>>>>
>>>>   
>>>
>>> Hi Klaus,
>>>
>>> first of all I want to thank you for your reply. I was on some 
>>> business trip last two weeks so I wasn't able to thank you for reply 
>>> and try "revert_uri" function. I try it today but still is the same, 
>>> I keep getting "not found in usrloc" for user that is in "location" 
>>> table and for his alias. I can call user by his username and alias so 
>>> I believe that alias is correctly added to MySQL, but can not rewrite 
>>> username with alias and forward it to PBX.
>>>
>>> I have put ser.cfg and debug log in attachment, and if you be so kind 
>>> when you find time to make a quick look I would be very grateful. 
>>> This ser.cfg is my testing configuration and is basic. If I need 
>>> provide some outputs please let me know.
>>>
>>> Thank you very much !!!
>>>
>>>
>>> davor
>>
> 




More information about the sr-users mailing list