[SR-Users] uac_auth and (serial) forking

Daniel Tryba d.tryba at pocos.nl
Mon Aug 29 11:22:16 CEST 2016


On Fri, Aug 26, 2016 at 01:58:57PM +0200, Daniel-Constantin Mierla wrote:
> try to see if it works to do the authentication in the branch failure
> event route. There you can do processing as soon as the 401 arrives --
> it has to be tried to see if uac auth works fine there, if not probably
> needs some tuning.

Good idea, but uac_auth isn't allowed in such a block:

# kamailio -c
loading modules under config path: /usr/lib/x86_64-linux-gnu/kamailio/modules/
 0(46160) ERROR: <core> [cfg.y:3224]: yyparse(): misused command uac_auth
 0(46160) : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 617, column 12: Command cannot be used in the block

ERROR: bad config file (1 errors)

612: event_route[tm:branch-failure:authfailure] {
613:         if (t_check_status("401|407") && $(avp(dst_au){s.len})>0 && $(avp(dst_passwd){s.len})>0)
614:         {
615:                 $avp(auser) = $avp(dst_au);
616:                 $avp(apass) = $avp(dst_passwd);
617:                 uac_auth();
618: 
619:                 t_relay();
620:                 exit;
621:         }
}



More information about the sr-users mailing list