On Tue, Sep 30, 2008 at 3:47 PM, Joseph Attardi <[EMAIL PROTECTED]> wrote:
> M. Ranganathan wrote:
>>
>> What do you do to respond to the challenge? You have to actually issue
>> a new request with the necessary credentials. There is a helper
>> function which should do the job. Its in the click to call code.
>
> I am calling the same method the click to call code does.
>
> From ClickToCallPanel.call():
> String domain = getDomainManager().getDomain().getName();
> String userAddrSpec = getUser().getAddrSpec(domain);
> String number = getNumber();
> String destAddrSpec = SipUri.fix(number, domain);
> getSipService().sendRefer(getUser(), userAddrSpec, destAddrSpec);
>
> From ActiveConferenceContextImpl.invite
> String domain = m_domainManager.getDomain().getName();
> String sourceAddressSpec = SipUri.fix(inviteNumber, domain);
> m_sipService.sendRefer(user, sourceAddressSpec,
> m_conferenceBridgeContext.getAddressSpec(conference))
>
>
> Furthermore, that methods returns void, so I don't see where I could put
> anything to respond to a challenge.
>
> sendRefer already includes the credentials when it makes the call, in
> InviteMessage.createAndSend():
>
> ClientTransaction ctx =
> getSipProvider().getNewClientTransaction(request);
> TransactionApplicationData tad = new TransactionApplicationData(m_operator,
> getHelper(), this);
> *** tad.setUserCredentials(m_userCredentials);
The transaction application data is just a piece of data you can
assoicate with the transaction. It avoids you the headache of keeping
a global hashtable around with a transaction to data mapping and
worrying about garbage collection when the transaction is teminated.
Setting
tad.setUserCredentials(...)
Is just setting an object reference.
You cannot send the creds apriori. You have to wait for the challenge
and re-issue it.
Can I see the code that responds to the 407 challenge?
Something like
if ( response.getStatusCode() == 407 ) {
// Need to see the stuff here.
}
> ctx.setApplicationData(tad);
>
--
M. Ranganathan
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev