cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5842
Views
0
Helpful
11
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Jonathan Withers on 16-07-2009 11:40:03 AM
Hi,
 
I need to write an application that sets a call forward for certain number.
 
I cannot find the method to do this in the AXL SOAP WSDL. COuld someone please point me in the write direction.
 
Many thanks
 
Jon

Subject: RE: Call Forwarding via AXL SOAP
Replied by: Randy Richardson on 16-07-2009 02:05:32 PM
Hey, I just recently got done doing this in C# .NET.  You can find my code examples in the thread about using UpdateLine and GetLine.
 
But anyways, to answer your question, you have to use the UpdateLine and set the callForwardAll property with a XCallFowardInfo object. In the XCallFowardInfo, set the destination and duration.
 
Hope that helps.

Subject: RE: Call Forwarding via AXL SOAP
Replied by: Jonathan Withers on 17-07-2009 08:14:18 AM
Hi Randy,
 
Thank you for pointing me to your thread, that's exactly what i needed.
 
Can you tell me how to remove a call forward as i can't work out how to do that?
 
Many thanks
 
Jon

Subject: RE: Call Forwarding via AXL SOAP
Replied by: Jonathan Withers on 17-07-2009 08:34:14 AM
Hi Randy,
 
I've worked out how to remove it. Thanks for your help.
 
Jon

Subject: RE: Call Forwarding via AXL SOAP
Replied by: Randy Richardson on 17-07-2009 06:53:06 PM
Glad you got it working.  Just sending an empty string for the destination should do the trick.
Comments
ampm_25
Level 1
Level 1

Hello,

I'm new to the AXL dev environment.  Essentially, I have a request from a user to try to automate a query/data pull for the current call forward information for a specific line.  I am familiar with both running a job, and CLI Query to pull the information.  What I'm not sure of is if there's a way to create some automation to pull the Call forward info and then dump to an excel file or alternative for an end user's retrieval/use.  I was thinking there may be an API/SDK tool or something to automate this.  Maybe I can set up a repeatable scheduled job, and then use Filezilla (ftp client) to log in automatically and download the job results file?  Any idea or help would be greatly appreciated.  We are currently running CUCM 9.1(2).

Thanks in advance for any assistance you may be able to provide.

Arras


npetrele
Cisco Employee
Cisco Employee

You can use an AXL SOAP call to do this.  Just execute a getLine for the directory number in question.  For example, if I want to get the default forward all settings for directory number 3000:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:getLine sequence="?">

         <pattern>3000</pattern>

         <returnedTags uuid="?">

            <callForwardAll>

               <forwardToVoiceMail></forwardToVoiceMail>

               <callingSearchSpaceName uuid="?"></callingSearchSpaceName>

               <secondaryCallingSearchSpaceName uuid="?"></secondaryCallingSearchSpaceName>

               <destination></destination>

            </callForwardAll>

         </returnedTags>

      </ns:getLine>

   </soapenv:Body>

</soapenv:Envelope>

This request will return something like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:getLineResponse xmlns:ns="http://www.cisco.com/AXL/API/10.5">

         <return>

            <line uuid="{2D655EE6-D16E-C4F7-D0B5-B1E2846CC8D5}">

               <callForwardAll>

                  <forwardToVoiceMail>false</forwardToVoiceMail>

                  <callingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                  <secondaryCallingSearchSpaceName xsi:nil="true" uuid="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

                  <destination>3001</destination>

               </callForwardAll>

               <enterpriseAltNum/>

               <e164AltNum/>

            </line>

         </return>

      </ns:getLineResponse>

   </soapenv:Body>

</soapenv:Envelope>

You can do this in a variety of languages.  For example, you can create a command-line PHP program.  Check out the AXL/PHP Primer here:  https://developer.cisco.com/site/axl/learn/how-to/axl-php-primer.gsp

Or just explore the AXL documentation available starting at this link for other languages and methods: Cisco AXL

ampm_25
Level 1
Level 1

Nicholas,


Thanks for the reply!  I have found that I still don't know what I'm doing with this.  I wanted to use command-line PHP as you suggested, but I am quickly finding that even difficult.  In following the axl-php-primer link you provided, I am attempting to instantiate the Soap client as instructed, but obviously am not doing that correctly.  My steps were as follows:

  • Download the Axl toolkit and unzip
  • Download PHP and unzip to a folder
    • Copy AXLAPI.wsdl, AXLSoap.xsd, and AXLEnums.xsd to the same folder that PHP is installed
  • Copy the soap client code as denoted on the page and save as soapclient.php
  • Attempt but fail to instantiate the soap client by running the following:
    • php -f soapclient.php -- -AXLAPI.wsdl
    • php soapclient.php
    • php soapclient.php AXLAPL.wsdl

Unfortunately, regardless of how I ran it, I received the same error of:

     PHP Fatal error:  Class 'SoapClient' not found in C:\Tools\PHP\SoapClient.php on line 6

My internet search has not turned up anything, so any help would be greatly appreciated.  Seeing as how I can't get past the first step, I can't progress to getting the little info I'm after.

jmn
Level 1
Level 1

I have code  to set Callforwarding if you are intrested.

Jan Meeling

npetrele
Cisco Employee
Cisco Employee

Hi, sorry I didn't notice your reply until now.  If you want the world's easiest method of setting up PHP (and other support tools like Apache), I strongly recommend XAMPP.  It takes care of all the details for you, so you don't have to worry about downloading and installing different modules. 

XAMPP Installers and Downloads for Apache Friends

ampm_25
Level 1
Level 1

I would definitely be appreciative of the code; which I'm sure I can adopt for my needs.  If you want to send it as an attachment, you can send it to avmartin25+cfwdscript@gmail.com

Thanks in advance for your assistance!

Arras

ampm_25
Level 1
Level 1

Nicholas,

Thanks, I will look at XAMPP, per your suggestion.

dantepaigecco
Level 1
Level 1

Do you still have that code? I'm looking to do the same for 10.5(2)

Hi jan,

i'm interessted in your code too.

thanks for your help.

dantepaigecco
Level 1
Level 1

Do you still have that code?

bulletbomb505
Level 1
Level 1
Good morning All. Jan if I can also have a look at your callforward code it would be much appreciated. I am very new to this CUCM and AXL so still a bit lost. Trying to do this with Python3 and Zeep. Thank you very much!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links