This document was generated from CDN thread
Created by: Roland Russwurm on 24-05-2011 08:59:08 AM
Hi,
can anybody explain the difference between Connection.redirect(String toNumber) and Call.transfer(String toNumber) ?
We experienced that Call.transfer was not working when the call is not in the correct state (e.g. ringing) so we used redirect now.
With redirect I now see issues with the CSS. Although the CSS on the line has international permissions I get a InvalidDestination Exception when redirecting the call to an external number (internal numbers work fine).
So I am really confused now which command to use.
Regards,
Roland
Subject: RE: Difference between redirect and transfer
Replied by: Mohan Potluri on 24-05-2011 12:34:46 PM
Pre-conditions for transfer(String) API as defined in JTAPI 1.2 specification:
<ol style="font-family: Times; line-height: normal; font-size: medium;">
<li>Let tc be the transfer controller on this Call</li>
<li>(this.getProvider()).getState() == Provider.IN_SERVICE</li>
<li>this.getState() == Call.ACTIVE</li>
<li>tc.getCallControlState() == CallControlTerminalConnection.TALKING</li>
</ol>
So the call should be answered for this API to work.
Cisco JTAPI allows redirect(Sting) API to be done in CallControlConnection.OFFERED or CallControlConnection.ALERTING or CallControlConnection.ESTABLSIHED states.
If CSS is setup correctly try CiscoConnection.redirect(destination, CiscoConnection.REDIRECT_NORMAL, CiscoConnection.ADDRESS_SEARCH_SPACE);
When this is used CSS of the party doing the redirect is used. I think by default calling address CSS is used.
Can you try the above API and let me know if it resolved the issue.
Subject: RE: Difference between redirect and transfer
Replied by: Roland Russwurm on 25-05-2011 04:27:30 PM
Hi Mohan,
thanks for your detailed response. Adding CiscoConnection.REDIRECT_NORMAL, CiscoConnection.ADDRESS_SEARCH_SPACE really solved the issue. Normally we do this in our code but I expected this is also the default. Now I know better.
Regards,
Roland