Skip to main content

how to implement attended transfer in jain sip?

1 reply [Last post]
dracularking
Offline
Joined: 2008-01-08
Points: 0

hi everyone,
i now know how to implement the unattended transfer in the sip communicator like follows:
public void unattendedtransfer(CallParticipant participant, String target)
throws OperationFailedException
{
Address targetAddress = null;
try
{
targetAddress = protocolProvider.parseAddressStr(target);
}
catch (ParseException ex)
{
throwOperationFailedException(
"Failed to parse target address string.",
OperationFailedException.ILLEGAL_ARGUMENT, ex);
}

CallParticipantSipImpl sipParticipant =
(CallParticipantSipImpl) participant;
Dialog dialog = sipParticipant.getDialog();
Request refer = createRequest(dialog, Request.REFER);
//it's the core code for unattended transfer
refer.addHeader(protocolProvider.getHeaderFactory()
.createReferToHeader(targetAddress));

sendRequest(sipParticipant.getJainSipProvider(), refer, dialog);

}

but how about attended transfer? how to integrate replaces parameter into Refer-To header, i tried a lot of ways, all failed..
thanks..

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
baranowb
Offline
Joined: 2006-01-09
Points: 0