[reSIProcate] how to include "authorization" field in the first "INVITE" sip message
Allen Guan
allenguan at gmail.com
Wed Oct 2 16:31:33 CDT 2013
Hi, all,
I have a question: I want to include "Authorization" in the first "INVITE"
sip message, my code is as follows:
---------
std::string sDialOutUser = DIALOUT_FROM_NUMBER;
NameAddr dialoutAor;
dialoutAor.uri().host() = g_uConferenceConfigure.m_
sExternalIp;
dialoutAor.uri().port() = g_uConferenceConfigure.m_iSIPPort;
dialoutAor.uri().user() = sDialOutUser.c_str();
Data dialoutpasswd("111");
oDialogUsageManager->getMasterProfile()->setDefaultFrom(dialoutAor);
oDialogUsageManager->getMasterProfile()->setDigestCredential(dialoutAor.uri().host(),
dialoutAor.uri().user(), dialoutpasswd);
oDialogUsageManager->getMasterProfile()->setImsAuthUser(sDialOutUser.c_str(),
oInviteMsgAddr.uri().getAorNoPort());
SharedPtr<SipMessage> inviteMessageUac =
oDialogUsageManager->makeInviteSession(oInviteMsgAddr, &oLocalSdp);
--------
the generated sip message's "Authorization" has empty "nonce" and
"response", I guess at least "response" should not be empty to include the
digest credential information, right? Would you please kindly tell me
what's the correct way to do it?
Thanks a lot!
-Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20131002/bcc85808/attachment.htm>
More information about the resiprocate-devel
mailing list