Hi Juha,
2009/4/22 Juha Heinanen <jh(a)tutpro.com>om>:
check that you also have defined gw_uri_avp. perhaps
the error message
is wrong.
I have this parameters defined:
loadmodule "lcr.so"
modparam("lcr", "db_url",
"mysql://openser:openserrw@db/kamailio")
modparam("lcr", "gw_table", "gw")
modparam("lcr", "gw_name_column", "gw_name")
modparam("lcr", "ip_addr_column", "ip_addr")
modparam("lcr", "port_column", "port")
modparam("lcr", "uri_scheme_column", "uri_scheme")
modparam("lcr", "transport_column", "transport")
modparam("lcr", "grp_id_column", "grp_id")
modparam("lcr", "lcr_table", "lcr")
modparam("lcr", "strip_column", "strip")
modparam("lcr", "prefix_column", "prefix")
modparam("lcr", "from_uri_column", "from_uri")
modparam("lcr", "priority_column", "priority")
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "contact_avp", "$avp(i:711)")
modparam("lcr", "fr_inv_timer_avp",
"$avp(s:fr_inv_timer_avp)")
modparam("lcr", "fr_inv_timer", 90)
modparam("lcr", "fr_inv_timer_next", 30)
modparam("lcr", "rpid_avp", "$avp(s:rpid)")
modparam("lcr", "flags_avp", "$avp(i:712)")
if you still have the problem, tell exactly which lcr
functions you call
in which order before the error occurs.
For PSTN termination:
----------------------------------------------------------------------------------------------------
avp_print();
if(!load_gws())
{
xlog("L_ERR", "Error loading PSTN gateways - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n");
sl_send_reply("503", "PSTN Termination Currently
Unavailable");
exit;
}
if(!next_gw())
{
xlog("L_ERR", "No PSTN gateways available - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n");
sl_send_reply("503", "PSTN Termination Currently
Unavailable");
exit;
}
-----------------------------------------------------------------------------------------------------
In the debug I see:
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b578, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<callee_uuid>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0 / 1>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b548, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<acc_state>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<cfb / 3>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b648, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<acc_caller_domain>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<10.10.45.86 / 11>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b508, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<acc_caller_user>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0001 / 4>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613e4a8, flags=0x0002
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: id=<902>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0001|0001|10.10.45.86 / 21>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613e470, flags=0x0002
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: id=<901>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0002|0002|sipsvr|call / 25>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613e368, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<acc_callee_domain>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<10.10.45.86 / 11>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613e3f0, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<acc_callee_user>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0001 / 4>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613e330, flags=0x0083
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<cli>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<sip:0001@sipsvr / 15>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b5b0, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<caller_cli>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<sip:0002@sipsvr / 15>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp: p=0xb613b608, flags=0x0003
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
name=<caller_uuid>
Apr 22 16:17:47 [10540] INFO:avpops:ops_print_avp:
val_str=<0002 / 4>
Apr 22 16:17:47 [10540] DBG:lcr:do_load_gws: Added matched_gws[0]=[0,0]
Apr 22 16:17:47 [10540] DBG:lcr:do_load_gws: Added gw_uri_avp
<0sip:|0@10.10.45.228:5060;transport=udp>
Apr 22 16:17:47 [10540] DBG:lcr:next_gw: Added flags_avp <0>
Apr 22 16:17:47 [10540] ERROR:lcr:next_gw: No ruri_user AVP
-- juha
Thanks. Regards.
Antonio.