cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3310
Views
25
Helpful
4
Replies

How to create a softkey that do a CFwdAll (Call Forward All) to a predetermined number ?

marcio
Level 1
Level 1

I need to create a softkey that do a Call Forward All to a predetermined number, so I don't need to dial the destination number everytime, that is the default behaviour of the cfwdall softkey.

Someone knows how to achieve that ?

1 Accepted Solution

Accepted Solutions

William Bell
VIP Alumni
VIP Alumni

There is no way to program a CFA+SpeedDial softkey per se. You could consider one of the following:

1. Leverage a null pattern to auto dial.

- Create a partition to hold a null pattern (e.g. autofwd_pt)

- Create a css to hold the new partition (e.g. autofwd_css)

- Set the CFA primary and secondary CSS on the primary line to autofwd_css. Set the line to "use configured" for CFA policy

- Create a null (blank) translation pattern in autofwd_pt and have it expand to the number you want to auto forward to

2. Create a XML app/service. Method 1

- Use the Phone SDK to guide you

- Create an app that will send the key sequence to the phone to do the forward for you.

- think of this like a key batch sequence

3. Create a XML app/service. Method 2

- Use AXL/SOAP API on CUCM

- your app would receive the command from the phone

- your app will send the appropriate AXL/SOAP call to the CUCM to change the forwarding destination

For option 2 and 3 the benefit is that you can then add a way for users to customize the destination. I have not tested option #1 but it should work.  I have developed solutions for customers that leverage option 3. So, I know that works.

HTH.

Regards,

Bill (http://ucguerrilla.com)

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

View solution in original post

4 Replies 4

Chris Deren
Hall of Fame
Hall of Fame

The only way I can think of is to build a speed dial and press callFwdAll feature and pressing the speed dial button.

Chris

William Bell
VIP Alumni
VIP Alumni

There is no way to program a CFA+SpeedDial softkey per se. You could consider one of the following:

1. Leverage a null pattern to auto dial.

- Create a partition to hold a null pattern (e.g. autofwd_pt)

- Create a css to hold the new partition (e.g. autofwd_css)

- Set the CFA primary and secondary CSS on the primary line to autofwd_css. Set the line to "use configured" for CFA policy

- Create a null (blank) translation pattern in autofwd_pt and have it expand to the number you want to auto forward to

2. Create a XML app/service. Method 1

- Use the Phone SDK to guide you

- Create an app that will send the key sequence to the phone to do the forward for you.

- think of this like a key batch sequence

3. Create a XML app/service. Method 2

- Use AXL/SOAP API on CUCM

- your app would receive the command from the phone

- your app will send the appropriate AXL/SOAP call to the CUCM to change the forwarding destination

For option 2 and 3 the benefit is that you can then add a way for users to customize the destination. I have not tested option #1 but it should work.  I have developed solutions for customers that leverage option 3. So, I know that works.

HTH.

Regards,

Bill (http://ucguerrilla.com)

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

+5 Bill for out of box thinking.

Chris

Anthony Holloway
Cisco Employee
Cisco Employee

I don't think there is a way to modify the behavoir of the default softkeys. Your option then, would be to create a Phone Service, which interacts with a 3rd Party Development Server (like a Windows Web Server) that would then process the request from the phone, and in turn, write to the callforwarddynamic table on the Publisher.

 

The callforwarddynamic table record is associated to a record in the numplan table which is the DN of the phone. Since a phone can have more than one DN, you would need to either tell the dev server what DN you are call forwarding, or have the dev server discover the primarly line on the phone, much like the default behavior of the CFwdAll softkey.

 

You can use a service URL like...

 

http://dev_server/cfwdall/device=#DEVICENAME#

 

...on everyphone you want this feature enabled for. Which makes the phone insert its own devicename into the URL which your dev server can key off of to know which phone to modify.

 

If you do the auto discover of the primary line, this would be all that's needed from the user/phone.

 

However, you could take it one step further and have the dev server return a menu, which allows the user to select which line they wish to forward.

 

You could take it another step further, and have the dev server interact with the caller via menus, to do things like:

 

  • use the default number for forwarding
  • change the number on a one time basis
  • change the default number perminently
  • remove the forwarding
  • etc.

 

You'll have moved into development more than call control at this point, and help over at developer.cisco.com would be of great help to you. Though, some help would be available here as well.

 

Good luck and remember that this is just one possible solution of potentially many.

 

EDIT: There were no replies to this thread when I started typing. =( +5 for Bill.

 

EDIT EDIT: It's now 2 years later and I actually had to build something for this, so I thought I'd come back and share some more for those of you googling for an answer....Joe ;)

 

1. The IP Phone Service looks like this:

Name: CFA OneTouch

URL: http://dev_server/cfwdall/?device=#DEVICENAME#

Parameter: destination

 

2. Subscribe it to the phone and set a destination

 

3. Set a SURL on one of the phone buttons and assign it the subscribed service

 

4. Create the backend AXL programming.  My web server code is in PHP and looks like this:

<?php

// Set the content of the response to plain text
header('Content-type: text/plain');

// This is an internal URI to close the confirmation window (works on 9971 type phones, adjust for other models)
header("Refresh: 3; url=Key:NavBack");

// If no device name was given via HTTP GET, abort
if (!array_key_exists('device', $_GET)) {
  die();
}

// Capture the given device name
$target_device = $_GET['device'];

// If no destination was given via HTTP GET, abort
if (!array_key_exists('destination', $_GET)) {
  die();
}

// Capture the new forwarding destination
$target_destination = $_GET['destination'];

// AXL code to setup the connection to the publisher
$client = new SoapClient(
  'C:\Program Files\EasyPHP-DevServer-14.1VC9\data\localweb\projects\cisco\axl\schema\10.5\AXLAPI.wsdl',
    array(
      'trace'=>true,
      'exceptions'=>true,
      'location'=>"https://cucm.company.com:8443/axl/",
      'login'=>'axladmin',
      'password'=>'p@ssw0rd',
    )
);
	
// Try to pull the phone lines (DN and Index) via AXL
try {
  $response = $client->getPhone(
    array(
      'name' => $target_device,
      'returnedTags' => array(
        'lines' => array(
          'line' => array(
            'index' => true,
            'dirn' => array(
              'pattern' => true
            )
          )
        )
      )
    )
  );
} catch (Exception $fault) {
  // Could not pull the phone lines, display error on phone and quit
  die('Could not find this phone.');
}

// line is an array of lines despite the name being singular
if (isset($response->return->phone->lines->line)) {
  // $lines is now an array of objects...or is it?
  $lines = $response->return->phone->lines->line;
} else {
  // There were no lines found on this phone, quit
  die('No lines found.');
}

// If there was only a single line on the phone, then $lines
// is not an array, and so we make it one so that processing
// a phone with a single line is the same as one with multiple
if (!is_array($lines)) {
  $lines = array($lines);
}

// Iterate over each line on the phone
foreach ($lines as $line) {
  // But target only the line with an Index of 1 (primary line)
  if ($line->index == '1') {
    // Store a reference to the DN UUID for the primary line
    $dirn = $line->dirn;
    // Try to make an AXL call to query the details of the line
    try {
      $response = $client->getLine(
        array(
          'uuid' => $dirn->uuid,
          'returnedTags' => array(
            'pattern' => true,
            'callForwardAll' => array(
              'forwardToVoiceMail' => true,
              'destination' => true,
              'callingSearchSpaceName' => true,
              'secondaryCallingSearchSpaceName' => true
            )
          )
        )
      );
    } catch (Exception $fault) {
      // Something went wrong getting the details of the primary line
      die('Could not get line details.');
    }

    // $dirn was the uuid but now it's an object with line properties
    $dirn = $response->return->line;

    // Try to update the line on the phone with the new target destination
    try {
      $response = $client->updateLine(
        array(
          'uuid' => $dirn->uuid,
          'callForwardAll' => array(
            'forwardToVoiceMail' => 'false',
            'destination' => $target_destination,
            'callingSearchSpaceName' => $dirn->callForwardAll->callingSearchSpaceName,
            'secondaryCallingSearchSpaceName' => $dirn->callForwardAll->secondaryCallingSearchSpaceName
          )
        )
      );

    // Display the outcome of the AXL call to the phone screen
    echo "Successfully Forwarded to " . $target_destination;
    } catch (Exception $fault) {
      // Something went wrong with changing the line
      die('Could not update the line.');
    }

  }

}

?>

 

This is a proof of concept solution.  Please use as a learning tool, not a product which I will support or back.  Also note, this tool does not unforward the phone.  This was a choice I made, because unforwarding the phone can be done in the normal process and why recreate the wheel?

Last note: I don't go into other specifics like how to enable AXL and create a user, and download the WSDL, etc.  You will need to have a working AXL environment for this to be plug-n-play, otherwise, you're going to try and drop this in as-is and it wont work.

good luck.

Anthony Holloway

 

Please use the star ratings to help drive great content to the top of searches.