[SR-Users] Kamailio PSTN with User/Pass authentication
Infinicalls Infinicalls
infinicalls at gmail.com
Wed Sep 23 19:32:34 CEST 2015
Hi,
I moved the uac_auth to the failure route and it compiled without
errors. Thanks. But the problem is calls are not getting through. And
users are unable to connect. Here is my config file.
"
# ----- UAC -----
modparam("uac","auth_realm_avp","$avp(s:auth_realm_avp)")
modparam("uac","auth_username_avp","$avp(s:auth_username_avp)")
modparam("uac","auth_password_avp","$avp(s:auth_password_avp)")
route[HANDLE_PROXY_AUTH_RESPONSE_M]
{
if ($T_reply_code == "407") # there's also 401
{
$avp(s:auth_realm_avp) = "whichever realm is used";
$avp(s:auth_username_avp) = "xxxxxxxxxx";
$avp(s:auth_password_avp) = "xxxxxxxxxx";
}
}
failure_route[STD_FAILURE_ROUTE]
{
if (uac_auth())
{
xlog("L_INFO", "$var(tan)[HANDLE_PROXY_AUTH_RESPONSE_M] did
auth. Relaying to new destination. from=$fu,
callee-selected-by=$ou, uri=$ru");
route(RELAY_ROUTE_C); # doing the relay here
exit;
}
else
{
xlog("L_INFO", "$var(tan)[HANDLE_PROXY_AUTH_RESPONSE_M] no
matching realm found. realm=$ar");
}
route(HANDLE_PROXY_AUTH_RESPONSE_M);
}
"
<snip>
Can somebody give me a working example and help me. thanks.
regards
Ganesh Kumar
More information about the sr-users
mailing list