Hi guys,
I was debugging an install on kamailio 3.0, and was asked to add per
user custom outbound proxies.
To do so, I used load_credentials from auth_db to store the custom route
in an avp, as you can see in the relevant part below.
I noticed a strange thing, POINT 1 show "OK", but POINT 2 shows "KO".
Is it a normal behaviour that avp got deleted after the Dialog PART ?
Regards,
Gled
---------------------------------------------------------------------------------
modparam("auth_db", "load_credentials",
"$avp(s:proxy)=outbound_override;$avp(s:rights)=rights;$avp(s:max_out)=max_out")
route[INVITE_FROM_UAC] {
if (!www_authorize("", "my_user_view")) {
www_challenge("", "1");
}
if ( !($tU =~ $avp(s:rights_ereg)) ) {
sl_send_reply("403","Forbidden");
t_release();
exit();
}
/* POINT 1 */
if ( is_avp_set("$avp(s:proxy)") ) {
xlog("OK");
}
else {
xlog("KO");
}
get_profile_size("outbound","$fU","$avp(calls_out)");
if ( $avp(s:max_out) != 0 && $avp(calls_out) >= $avp(s:max_out) ) {
t_reply("403","Too Many calls");
t_release();
exit();
}
/* Dialog PART */
if (!is_in_profile("outbound")) {
dlg_manage();
set_dlg_profile("outbound","$fU");
}
/* POINT 2 */
if ( is_avp_set("$avp(s:proxy)") ) {
xlog("OK");
}
else {
xlog("KO");
}
}
---------------------------------------------------------------------------------