If the original server does not want to accept trust by sending a request, it should return 401 (unauthorized)
Echo. The response must include a WWW-Authentication Header. Second, the response must contain at least one (possibly new) requested resource.
(Challenge). If the proxy does not accept the request to send trust, it should return a 407 (proxy authentication required) response.
The response must include a proxy_authenticate header domain, which must contain at least one question (which may be new and available by the proxy ).
For requested resources)
1. What are the prerequisites for 407 event generation?
2. What is the response to the 407 event?
3. What is the difference between proxy authorization and WWW authorization?
The macro definition of an event is as follows:
180-exosip_call_answered
407-exosip_call_requestfailure
401 and 403-exosip_registration_failure.
Osip_authorization_t * auth_header;
Osip_authorization_init (& auth_header );// The role of this sentence is unknown
I have been paying attention to this function for a while but have not found the answer:
Osip_message_get_proxy_authenticate (Je-> response, 0, & proxy_auth );
// The problem caused by the following function calls is the error of releasing the heap object !!
Osip_authorization_set_auth_type (auth_header, "Digest ");
Osip_authorization_set_username (auth_header, add_quotes (username. s ));
Osip_authorization_set_realm (auth_header, add_quotes (realm. s ));
Osip_authorization_set_nonce (auth_header, add_quotes (nonce. s ));
Osip_authorization_set_uri (auth_header, add_quotes (URI. s ));
Osip_authorization_set_response (auth_header, add_quotes (responsemd5.s ));
Osip_authorization_set_algorithm (auth_header, algorithm );