On 05/17/2010 06:30 PM, Ricardo Martinez wrote:
I'm sending the INVITE to the asterisk box.. the
asterisk responds a
"SIP/2.0 401 Unauthorized."
From where do I get the user/pass to authenticate the user?
In your initial request route, arm a failure route and catch the 401
challenge:
route {
...
t_on_failure("FAILURE_HANDLE");
if(!t_relay())
sl_reply_error();
}
failure_route[FAILURE_HANDLE] {
if(t_is_cancelled())
exit;
if(t_check_status("401")) {
uac_auth();
}
...
t_relay();
}
}
--
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web:
http://www.evaristesys.com/