Hi,
When a 407 message comes in then sipXtapi tries to build an authenticated
message inside SipLineMgr::buildAuthenticatedRequest. Then it tries to get the
username and password associated with the realm. However, in
SipLine::getCredentials we pass the realm which was advertised in the 407
message. If your realm is correctly set then it will be found and an
authenticated response will be send otherwise it will fail. Interestingly,
SipLine::getCredentials also searches for an empty realm. So, to overcome the
problem we can set a credential with an empty realm each time we add
credentials on a line.
In SipLineMgr::addCredentialForLine, before returning true, I have added the
following:
if (!line->IsDuplicateRealm (NULL, type))
{
line->addCredentials (NULL, strUserID, strPasswd, type); //Add a credential
for this identity having empty realm
}
return true;
This seems to have solved the problem. However, a more correct solution will be
to search for the realm set on the line and not the one advertised in the 407
message inside SipLineMgr::buildAuthenticatedRequest. Any suggestions on how
this can be done?
Thanks.
Best Regards,
Hitesh_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/