I tried using dialog module and was throwing the following error. dialog module was loaded after tm and rr modules.
modparam("dialog", "hash_size", 2048)
modparam("dialog", "timeout_avp", "$avp(i:10)")
modparam("dialog", "default_timeout", 21600)
request_route {
..
dlg_manage();
if(is_method("INVITE") && !has_totag())
{
if(get_profile_size("caller","$fu","$avp(size)")) {
if($avp(size) >= 2) {
send_reply("403", "Too many active calls");
exit;
}
else
{
set_dlg_profile("caller","$fu");
}
}
}
# dispatch destinations to LOADBALANCE
#!ifdef WITH_LOADBALANCE
if($rU=~"^([0-9]{10}|1[0-9]{10}|3706[0-9]{10}|37051[0-9]{10})$")
{
route(LOADBALANCE);
}
#!endif
route(LOCATION);
route(RELAY);
}
reply_route {
unset_dlg_profile("caller","$fu");
}