Hello, did you use t_relay() after all the lcr logic?
Cheers, Daniel On 10/03/16 23:19, Roberto Innaimi wrote: > Hi to all, > > i want to use prefix based LCR routing, but for some reason, something > is not working as expected. > > Can anyone help me? > > This is the LCR configuration: > > > #LCR MODULE > loadmodule "lcr.so" > > modparam("lcr", "db_url", > "mysql://kamailioro:kamailioro@localhost/kamailio") > modparam("lcr", "lcr_gw_table","lcr_gw") > modparam("lcr", "id_column", "id") > modparam("lcr", "gw_name_column", "gw_name") > modparam("lcr", "ip_addr_column", "ip_addr") > modparam("lcr", "hostname_column", "hostname") > modparam("lcr", "port_column", "port") > modparam("lcr", "params_column", "params") > modparam("lcr", "uri_scheme_column", "uri_scheme") > modparam("lcr", "transport_column", "transport") > modparam("lcr", "strip_column", "strip") > modparam("lcr", "tag_column", "tag") > modparam("lcr", "flags_column", "flags") > modparam("lcr", "defunct_column", "defunct") > modparam("lcr", "lcr_rule_table", "lcr_rule") > modparam("lcr", "prefix_column", "prefix") > modparam("lcr", "from_uri_column", "from_uri") > modparam("lcr", "request_uri_column", "request_uri") > modparam("lcr", "stopper_column", "stopper") > modparam("lcr", "enabled_column", "enabled") > modparam("lcr", "lcr_rule_target_table", "lcr_rule_target") > modparam("lcr", "rule_id_column", "id") > modparam("lcr", "gw_id_column", "gw_id") > modparam("lcr", "priority_column", "priority") > modparam("lcr","weight_column", "weight") > > modparam("lcr", "gw_uri_avp", "$avp(i:709)") > modparam("lcr", "ruri_user_avp", "$avp(i:500)") > > > modparam("lcr", "tag_avp", "$avp(lcr_tag)") > modparam("lcr", "flags_avp", "$avp(i:712)") > modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)") > modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)") > > > route[LCR] { > if (status=="200") > { > xlog("LCR: Inside the LCR route\n"); > } > > if(method=="INVITE") > { > xlog("We got an invite"); > if(!load_gws(1, $rU, $var(caller_uri))) { > xlog("Couldn't load gateways"); > sl_send_reply("500", "Server Internal Error - Cannot load gateways"); > exit; > } else { > xlog("GW Selected '$avp(i:709)'\n"); > xlog("Domain of destination: $dd\n"); > xlog("To URI: $tu\n"); > } > > if(!next_gw()) { > xlog("Couldn't proceed to next gateway"); > sl_send_reply("503", "Service not available, no gateways found"); > exit; > } else { > xlog("Calling the first matched gateway\n"); > xlog("ruri_user_avp: '$avp(i:500)'\n"); > xlog("To URI after next_gw: $tu\n"); > xlog("Request URI: $rU\n"); > > } > } > } > > > > > AND this is the error which i have got: > > > > 17(7483) ERROR: <script>: We got an invite17(7483) ERROR: <script>: GW > Selected '1|sip:|3|||2873019861||5060||;transport=udp|1' > > 17(7483) ERROR: <script>: Domain of destination: <null> > > 17(7483) ERROR: <script>: To URI: sip:001326212223313@10.10.0.10 > > 17(7483) ERROR: <script>: Calling the first matched gateway > > 17(7483) ERROR: <script>: ruri_user_avp: '001326212223313' > > 17(7483) ERROR: <script>: To URI after next_gw: > sip: 001326212223313@10.10.0.10 > > 17(7483) ERROR: <script>: Request URI: 326212223313 > > > -- > Roberto Innaimi > roberto.inna...@gmail.com > > > _______________________________________________ > 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 -- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
_______________________________________________ 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