[Users] next_gw(): No ruri_user AVP

Raymond Chen rchen at broadz.com
Tue Feb 21 06:12:40 CET 2006


Hi Bogdan,

I solved problem by forcing avp_write("$ruri/username", "i:1402").  

Thanks

Ray


-----Original Message-----
From: users-bounces at openser.org [mailto:users-bounces at openser.org] On Behalf
Of Raymond Chen
Sent: Thursday, February 16, 2006 12:27 AM
To: 'Bogdan-Andrei Iancu'
Cc: Users at openser.org
Subject: RE: [Users] next_gw(): No ruri_user AVP

Hi Bogdan,

Both, after load_gw and before next_gw avps are visible.   But not after
next_gw.  There is no where in the script delete any avp.

Ray


-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
Sent: Wednesday, February 15, 2006 8:18 AM
To: Raymond Chen
Cc: daniel at voice-system.ro; Users at openser.org
Subject: Re: [Users] next_gw(): No ruri_user AVP

Ray,

I think there is a problem in the script - if you see the gw_uri avps, 
it's quite impossible not to see them also before and after the 
next_gw() call in request route. Disregarding the ruri_avp, the gw_uri 
avps should be visible.
are you sure you do not delete all the avps in your script. Try placing 
avp_print before and after each lcr function call.

regards,
bogdan

Raymond Chen wrote:

>Hi bogdan,
>
>I put avp_print after next_gw , no avp output.
>
>
>1(1334) load_gws(): DEBUG: Added gw_uri_avp <sip:@xxx.xxx.xxx.138:5060>
> 1(1334) load_gws(): DEBUG: Added gw_uri_avp <sip:@xxx.xxx.xxx.139:5060>
> 1(1334) does_uri_exit(): User in request uri does not exist
> 1(1334) is_user_in(): User is in group 'local'
> 1(1334) db_flags=3, flags=12
> 1(1334) DEBUG:avpops:load_avps: loaded avps = 1
> 1(1334) parse_headers: flags=ffffffffffffffff
> 1(1334) DEBUG:avpops:pushto_avps: 1 avps were processed
>1(1334) next_gw(): No ruri_user AVP
>
>
>
>
>
>
>-----Original Message-----
>From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>Sent: Wednesday, February 15, 2006 4:39 AM
>To: Raymond Chen
>Cc: daniel at voice-system.ro; Users at openser.org
>Subject: Re: [Users] next_gw(): No ruri_user AVP
>
>Ray,
>
>the ruri_avp is added by next_gw after its usage from the REQUEST route. 
>You may check this by placing an avp_print after you did next_gw() in 
>request route (after calling route 3, for example). Check if there is 
>any avp with ID 1402.
>
>regards,
>bogdan
>
>Raymond Chen wrote:
>
>  
>
>>Hi bogdan,
>>
>>We called Load_gw and next-gw from request route.  We have no problem with
>>next_gw if the if (avp_pushto("$ruri", "s:fwdnoanswer")) happens in the
>>    
>>
>main
>  
>
>>route.  But when it does in the failure_route the next_gw can't find the
>>ruri_user avp.
>>
>>Raymond
>>
>>
>>
>>Route {
>>	
>>	..........
>>
>>	Route(3);
>>
>>	...........
>>
>>}
>>
>>failure_route[1] {
>>
>>	if (t_check_status("(480)|(408)")) {
>>		if (avp_pushto("$ruri", "s:fwdnoanswer")) {
>>			avp_delete("s:fwdnoanswer");
>>			route(3);
>>		};
>>	};
>>
>>}
>>
>>Route[3] {
>>
>>       if (!load_gws()) {
>>               sl_send_reply("500", "Server Internal Error - Cannot load
>>gateways");
>>               return;
>>       };
>>
>>        ...............
>>
>>       Route(5);
>>
>>}
>>
>>Route[5] {
>>	
>>        if (!next_gw()) {               
>>               rewriteuri("sip:userbusy at 211.102.91.134:443");
>>               t_relay();              
>>               return;                         
>>       };   
>>
>>       ..............
>>
>>}	
>>
>>
>>
>>-----Original Message-----
>>From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>>Sent: Wednesday, February 15, 2006 2:25 AM
>>To: Raymond Chen
>>Cc: daniel at voice-system.ro; Users at openser.org
>>Subject: Re: [Users] next_gw(): No ruri_user AVP
>>
>>Hi Ray,
>>
>>do you call load_gws() from failure route? if so, not that this is not 
>>supported.
>>For LCR to work properly, you need to call load_gws() and next_gw() from 
>>the request route and later next_gw() from failure routes.
>>
>>regards,
>>bogdan
>>
>>Raymond Chen wrote:
>>
>> 
>>
>>    
>>
>>>Hi Bogdan,
>>>
>>>Here is the debug
>>>
>>>1(2584) load_gws(): DEBUG: Added gw_uri_avp <sip:@xxx.xxx.xxx.138:5060>
>>>1(2584) load_gws(): DEBUG: Added gw_uri_avp <sip:@xxx.xxx.xxx.139:5060>
>>>1(2584) DEBUG:avpops:print_avp: p=0xf4f167c8, flags=2
>>>1(2584) DEBUG:                 id=<1400>
>>>1(2584) DEBUG:                 val_str=<sip:@xxx.xxx.xxx.139:5060>
>>>1(2584) DEBUG:avpops:print_avp: p=0xf4f16790, flags=2
>>>1(2584) DEBUG:                 id=<1400>
>>>1(2584) DEBUG:                 val_str=<sip:@xxx.xxx.xxx.138:5060>
>>>1(2584) does_uri_exit(): User in request uri does not exist
>>>1(2584) is_user_in(): User is in group 'local'
>>>1(2584) db_flags=3, flags=12
>>>1(2584) DEBUG:avpops:print_avp: p=0xf4f167f8, flags=B
>>>1(2584) DEBUG:                 id=<1400>
>>>1(2584) DEBUG:                 val_str=<sip:@xxx.xxx.xxx.139:5060>
>>>1(2584) DEBUG:avpops:print_avp: p=0xf4f16790, flags=2
>>>1(2584) DEBUG:                 id=<1400>
>>>1(2584) DEBUG:                 val_str=<sip:@xxx.xxx.xxx.xxx:5060>
>>>1(2584) next_gw(): No ruri_user AVP
>>>
>>>
>>>
>>>Raymond
>>>
>>>
>>>-----Original Message-----
>>>From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>>>Sent: Tuesday, February 14, 2006 10:55 AM
>>>To: Raymond Chen
>>>Cc: daniel at voice-system.ro; Users at openser.org
>>>Subject: Re: [Users] next_gw(): No ruri_user AVP
>>>
>>>Hi Ray,
>>>
>>>use avp_print() after the load_gw() to see what avps were loaded and 
>>>again just before next_gw() to see the available avp.
>>>this will help to see if it's a problem at the load or search part.
>>>
>>>regards,
>>>bogdan
>>>      
>>>




_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users







More information about the sr-users mailing list