Hi,
I have an application that registers as a client with a SIP server using HMP Windows 3.0. On the first SIP REGISTER message I send, I receiver a 401 Unauthorized response. Section 4.28 of the Global Call IP Technology Guide (https://www.dialogic.com/~/media/manuals/docs/globalcall_for_ip_hmp_v12.pdf) says:
"If the UAS (User Agent Server) rejects a request with a 401 or 407 response, the UAC (User Agent Client) can re-send the request in a form that includes the sender’s username and password to authenticate its identity."
When connecting a soft phone to the SIP server, I see it also receives a 401 response on the first attempt, and then sends a second, modified REGISTER request which the server accepts with a 200 response. In it's second REGISTER request, it includes a WWW-Authentication header which looks like it has been copied and modified from the 401 response headers.
I am using the board level device to do the registration, and am waiting for the GCEV_UNBLOCKED event before attempting registration. I am also calling gc_SetAuthenticationInfo() to attempt to add the username password.
My questions are:
- How can I retrieve the WWW-Authentication header in the 401 Unauthorized response after receiving the GCEV_SERVICERESP event?
- How can I add the WWW-Authentication header to my second REGISTER request?
Thanks!