Hello; i found the problem i hope i can explain the problem to get solution.
when first usage of load_gws() and next_gw() functions , next_gw() fills all uri avps to ru_AVPs from gws tables. if it goes to failure route or route again , it can re use ru_AVPs in next_gw(). so if recall the load_gws() again for choose new route , it uses old uri avps in next_gw() function , it is totally incorrect. if there is flag or parameter to define gws are reloaded , it can null to ru_AVPs to correct gws informations.
i couldn't find why fromuri appending itself. searching about it.
Thanks.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp... Sent from the Users mailing list archive at Nabble.com.
ycaner writes:
when first usage of load_gws() and next_gw() functions , next_gw() fills all uri avps to ru_AVPs from gws tables. if it goes to failure route or route again , it can re use ru_AVPs in next_gw(). so if recall the load_gws() again for choose new route , it uses old uri avps in next_gw() function , it is totally incorrect. if there is flag or parameter to define gws are reloaded , it can null to ru_AVPs to correct gws informations.
does it work if you destroy (e.g. using avp_delete("$avp(x)/g")) gw_uri_avp and ruri_user_avp before the second load_gws() call?
i couldn't find why fromuri appending itself. searching about it.
if i remember correctly, lcr functions do not modify from uri.
-- juha
Hey; Thanks for reply. before load_gws , setting ruri_user_avp to null solves request uri problems.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp... Sent from the Users mailing list archive at Nabble.com.
ycaner writes:
Thanks for reply. before load_gws , setting ruri_user_avp to null solves request uri problems.
load_gws() tries to delete possibly existing avp values by this statement:
delete_avp(gw_uri_avp_type|AVP_VAL_STR, gw_uri_avp);
obviously there is something wrong with if the avp needs to be deleted by the script.
i'll try at some point try to figure out how to delete an avp based on its name.
-- juha
in load_gws function there is a delete_avp for gw_uri_avp as you mentioned . but in my view it needs a delete_avp for ruri_user_avp. Because it is reloading gws for different route. Thanks.
04.12.2015 11:44 tarihinde Juha Heinanen [via SIP Router] yazdı:
ycaner writes:
> Thanks for reply. before load_gws , setting ruri_user_avp to null solves
> request uri problems.
load_gws() tries to delete possibly existing avp values by this
statement:
delete_avp(gw_uri_avp_type|AVP_VAL_STR, gw_uri_avp);
obviously there is something wrong with if the avp needs to be deleted
by the script.
i'll try at some point try to figure out how to delete an avp based on
its name.
-- juha
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp...
To unsubscribe from LCR module : re load_gws uri errors, click here . NAML
--
yasin-imza-2014.jpg (51K) http://sip-router.1086192.n5.nabble.com/attachment/143654/0/yasin-imza-2014.jpg
-- View this message in context: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp... Sent from the Users mailing list archive at Nabble.com.
ycaner writes:
in load_gws function there is a delete_avp for gw_uri_avp as you mentioned . but in my view it needs a delete_avp for ruri_user_avp. Because it is reloading gws for different route.
I added deletion of possible old ruri_user_avp value when next_gw() is called first time after load_gws().
It is currently in master branch only, but I can commit also to 4.3 branch if this fixes the issue.
-- Juha
Hello; i commented your last commit. Sorry , i think i couldn't explain situation. Here is log for more understand.
------------- Here is first load_gws and next_gws() functions are called--------------------- 6(10299) DEBUG: lcr [lcr_mod.c:1943]: load_gws(): load_gws(1, 10218503027337, ) 6(10299) DEBUG: lcr [lcr_mod.c:2014]: load_gws(): added matched_gws[0]=[21, 4, 1, 6054284] 6(10299) DEBUG: lcr [lcr_mod.c:1887]: add_gws_into_avps(): added gw_uri_avp <21|sip:|0||0|3020380345||5080||;transport=udp|0> with weight <6054284> 6(10299) DEBUG: lcr [../../resolve.h:258]: str2ip(): str2ip: ERROR: too few dots in [3020380345] 6(10299) DEBUG: lcr [../../resolve.h:355]: str2ip6(): str2ip6: ERROR: too few colons in [3020380345] 6(10299) DEBUG: lcr [lcr_mod.c:2175]: generate_uris(): r_uri <sip:10218503027337@ip:5080;transport=udp>, dst_uri <> 6(10299) DEBUG: lcr [lcr_mod.c:2456]: next_gw(): added ruri_user_avp <10218503027337> 6(10299) DEBUG: lcr [lcr_mod.c:2492]: next_gw(): added flags_avp <0> 6(10299) DEBUG: lcr [lcr_mod.c:2499]: next_gw(): added tag_avp <0> ------------ this route/number gives busy response, i am gonna change route and number--------- ------------- Second loads_gws and next_gws functions are called.------------------------------ 8(10303) DEBUG: lcr [lcr_mod.c:1943]: load_gws(): load_gws(1, 200015066109057, ) 8(10303) DEBUG: lcr [lcr_mod.c:2014]: load_gws(): added matched_gws[0]=[1, 5, 1, 2247144] 8(10303) DEBUG: lcr [lcr_mod.c:1887]: add_gws_into_avps(): added gw_uri_avp <1|sip:|5|200010|2|3020380345||5080||;transport=udp|0> with weight <2247144> 8(10303) DEBUG: lcr [../../resolve.h:258]: str2ip(): str2ip: ERROR: too few dots in [3020380345] 8(10303) DEBUG: lcr [../../resolve.h:355]: str2ip6(): str2ip6: ERROR: too few colons in [3020380345] 8(10303) DEBUG: lcr [lcr_mod.c:2175]: generate_uris(): r_uri <sip:200010503027337@ip:5080;transport=udp>, dst_uri <> 8(10303) DEBUG: lcr [lcr_mod.c:2492]: next_gw(): added flags_avp <0> 8(10303) DEBUG: lcr [lcr_mod.c:2499]: next_gw(): added tag_avp <2> --------------------------------r_uri must be 200015066109057 but it gets first called r_uri because r_uri saved---
Number 200015066109057 is stripped with five as underline. but lcr strips olds uri (10218503027337) as saved r_uri.
this route scripts a kind of that if pstn is busy , forward to call a cellphone.
04.12.2015 13:27 tarihinde Juha Heinanen [via SIP Router] yazdı:
ycaner writes:
> in load_gws function
> there is a delete_avp for gw_uri_avp as you mentioned . but in my
> view it needs a delete_avp for ruri_user_avp. > Because it is reloading gws for different route.
I added deletion of possible old ruri_user_avp value when next_gw() is
called first time after load_gws().
It is currently in master branch only, but I can commit also to 4.3
branch if this fixes the issue.
-- Juha
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp...
To unsubscribe from LCR module : re load_gws uri errors, click here . NAML
--
yasin-imza-2014.jpg (51K) http://sip-router.1086192.n5.nabble.com/attachment/143659/0/yasin-imza-2014.jpg
-- View this message in context: http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp... Sent from the Users mailing list archive at Nabble.com.