[OpenSIPS-Users] question about uac_auth and gateway authentication
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Sun Aug 1 17:07:50 CEST 2010
Hi Jozsef,
First of all, on proxy, after authenticating the phone (A), you should
call the "remove_credentials()" function to remove from the SIP request
the credentials send by A to authenticate to B - otherwise, they will be
forwarded to C also.
Now, the failure route should check the 401/407 authentication requests
the do the "uac_auth()" (auth B to C). Also check the return code of the
"uac_auth()" function to see if the authentication was correctly done
(if opensips has the credentials for the challenged realm):
failure_route[2] {
if (t_check_status("40[17]")) {
xlog("got challenged \n");
if (uac_auth()) {
xlog("auth was succesful \n");
t_relay("udp:ip_addr:5060");
}
}
Regards,
Bogdan
Jozsef CZOMPO wrote:
> Hi
>
> I'm try to configure opensips for the following scenario:
> - 'A' VoIP Phone
> - 'B' My opensips proxy
> - 'C' PSTN Gateway with auth
>
> The problem is: 'A' need to authenticate for 'B', it's OK. 'A' sends
> an INVITE to 'B' with auth credentials, to a public PSTN number. But i
> need to authenticate to 'C'. I'm trying the uac_auth but, when i'm
> running wireshark i'm seeing 'B' sending the wrong credentials (sends
> 'A' to 'B', not 'B' to 'C'). How can i use uac_auth? What is the the
> correct way for gateway auth? If i try to replace some words in
> failure_route with 'replace_all', is working so opensips processing
> failure_route[2], but don't insert the proper authentication
> information.
>
> from my route script (with replaced fake host names, and passwords):
>
> modparam("uac","credential","username:domain:password")
>
> route {
> ....
> t_on_failure("2");
> t_relay( "udp:ip_addr:5060" );
> ...
> }
>
> failure_route[2] {
> uac_auth();
> t_relay("udp:ip_addr:5060");
> }
>
> Czo
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list