I saw that, but
1. It doesn't work in failure_route (MANAGE_FAILURE from std. config) either
2. My question was more general - is it even possible to do what I need with Kamailio

2015-11-27 13:24 GMT+02:00 Daniel Tryba <d.tryba@pocos.nl>:
On Friday 27 November 2015 13:01:19 Alexandru Covalschi wrote:
> If I try to put
>         if ($T_reply_code == 401 or $T_reply_code == 407) {
>                 xlog("L_NOTICE", "Remote asked for authentication");
>                 uac_auth();
>         }
> to MANAGE_FAILURE or MANAGE_REPLY route Kamailio can't start.
>
> Is that even possible?


Why/What is the error reported?

Have you read:
http://www.kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%28%29
"
4.7.  uac_auth()

This function can be called only from failure route and will build the
authentication response header and insert it into the request without sending
anything.

This function can be used from FAILURE_ROUTE.
"

So is the error that you are using a function in the reply route that isn't
being allowed in that router?

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/