пример есть в документации на UAC,
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth()
}
а если верно помню - камалио сам всё сделает если ему табличку с параметрами сделать
"The module can register contact addresses to remote REGISTRAR servers. You have to add records to uacreg table. The table stores following attributes: "