Redirect a call

Very simple example, which shows you how to redirect a call. Checks if the mode is ok and then tries to redirect the call. Watch out: That also works, if you do not have any rights to redirect a call .. i do not know why 🙂 but it does. (Means: if your client is not able to do a forwarding to external numbers, you are able to do a redirect to them .. nearly the same i guess)


Written by Jörg Wiesmann 
Saturday, 05 August 2006

   @param ciscoConnection
   @param callControlConnection
   @param numberToRedirectTo
  public void setRedirectCall(CiscoConnection ciscoConnection, 
      CallControlConnection callControlConnection, 
      String numberToRedirectTo) {
    if (ciscoConnection != null && callControlConnection != null) {
      try {
        if (ciscoConnection.getCallControlState() == CallControlConnection.OFFERING
            || ciscoConnection.getCallControlState() == CallControlConnection.ALERTING
            || ciscoConnection.getCallControlState() == CallControlConnection.ESTABLISHED) {
        else {
      catch (InvalidStateException e) {
      catch (InvalidPartyException e) {
      catch (MethodNotSupportedException e) {
      catch (PrivilegeViolationException e) {
      catch (ResourceUnavailableException e) {

Leave a Reply

Your email address will not be published. Required fields are marked *