Hello, I've some understanding problem on lcr module.
I've this route route[LCR] { xlog("L_INFO", "ENTRO IN ROUTE LCR ********************************** \n"); if (!load_gws(1)) { sl_send_reply("503", "Unable to load gateways"); exit; } else { $var(i) = 0; while(is_avp_set("$(avp(i:709)[$var(i)])")) { xlog("L_INFO","loading gw_uri_avp[$var(i)]='$(avp(i:709)[$var(i)])'\n"); $var(i) = $var(i) + 1; avp_print(); }; if(is_avp_set("$avp(i:709)")) { xlog("L_INFO", "Trying gateway '$avp(i:709)'\n"); } else { xlog("L_INFO", "No More Gateways \n"); }; # try the first matched gateway if (next_gw()) { xlog("L_INFO","ruri_user_avp='$avp(i:500)'\n"); xlog("L_INFO","test ruri_avp_mod='$tu'\n"); #xlog("L_INFO","************************************************************ ****\n"); avp_print(); # Route to failure for failover #t_on_failure("2"); route(RELAY); } else { sl_send_reply("503","No available gateways"); exit; }; }; exit; } And this is what I get: Apr 27 15:44:44 localhost kamailio[7827]: INFO: <script>: ENTRO IN ROUTE LCR ********************************** Apr 27 15:44:44 localhost kamailio[7827]: INFO: <script>: loading gw_uri_avp[0]='1|1|3|774|1171521237|172.16.10.200|5060||1|0' Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1328]: p=0xb60dc5b0, flags=0x0112 Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1334]: id=<709> Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1340]: val_str=<1|1|3|774|1171521237|172.16.10.200|5060||1|0 / 45> Apr 27 15:44:44 localhost kamailio[7827]: INFO: <script>: Trying gateway '1|1|3|774|1171521237|172.16.10.200|5060||1|0' Apr 27 15:44:44 localhost kamailio[7827]: INFO: <script>: ruri_user_avp='09711234567' Apr 27 15:44:44 localhost kamailio[7827]: INFO: <script>: test ruri_avp_mod='sip: 09711234...@voip.myproxy.it' Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1328]: p=0xb60dc624, flags=0x0110 Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1334]: id=<712> Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1342]: val_int=<0> Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1328]: p=0xb60dc5b0, flags=0x0112 Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1334]: id=<500> Apr 27 15:44:44 localhost kamailio[7827]: INFO: avpops [avpops_impl.c:1340]: val_str=<09711234567 / 11> I expected that the lcr module strips 3 numbers from avp(i:500) and adds the prefix 774. Anyone can explane why it didn't works? The called number never changes in 77409711891234567. Any help will be appreciated. Thank you Danilo
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users