configure the xml api · configurethexmlapi...

46
Configure the XML API This chapter describes the eXtensible Markup Language (XML) Application Programming Interface (API) support available in Cisco Unified Communications Manager Express (Cisco Unified CME). Information About XML API, on page 1 Configure XML API, on page 40 Configuration Examples for XML API, on page 45 Where to Go Next, on page 45 Feature Information for XML API, on page 46 Information About XML API XML API Definition An XML API provides an interface to Cisco Unified CME that allows an external network management system (NMS) to configure and monitor Cisco Unified CME operations. XML API Provision Using IXI In previous versions of Cisco Unified CME, the XML interface provided configuration and monitoring functions using the HTTP port. The XML interface ran under the HTTP server process, simultaneously parsing incoming XML requests on demand and processing them. In Cisco Unified CME 4.0 and later versions, the XML interface is provided through the Cisco IOS XML Infrastructure (IXI), in which the parser and transport layers are separated from the application. This modularity provides scalability and enables future XML support to be developed. In Cisco Unified CME 4.0 and later versions, all Cisco Unified CME features have XML support. XML API for Cisco Unified CME The eXtensible Markup Language (XML) Application Programming Interface (API) is supported in Cisco Unified Communications Manager Express (Cisco Unified CME) 8.5 and later versions. Configure the XML API 1

Upload: others

Post on 31-Jan-2021

36 views

Category:

Documents


0 download

TRANSCRIPT

  • Configure the XML API

    This chapter describes the eXtensible Markup Language (XML) Application Programming Interface (API)support available in Cisco Unified Communications Manager Express (Cisco Unified CME).

    • Information About XML API, on page 1• Configure XML API, on page 40• Configuration Examples for XML API, on page 45• Where to Go Next, on page 45• Feature Information for XML API, on page 46

    Information About XML API

    XML API DefinitionAn XML API provides an interface to Cisco Unified CME that allows an external network managementsystem (NMS) to configure and monitor Cisco Unified CME operations.

    XML API Provision Using IXIIn previous versions of Cisco Unified CME, the XML interface provided configuration and monitoringfunctions using the HTTP port. The XML interface ran under the HTTP server process, simultaneously parsingincoming XML requests on demand and processing them.

    In Cisco Unified CME 4.0 and later versions, the XML interface is provided through the Cisco IOS XMLInfrastructure (IXI), in which the parser and transport layers are separated from the application. This modularityprovides scalability and enables future XML support to be developed. In Cisco Unified CME 4.0 and laterversions, all Cisco Unified CME features have XML support.

    XML API for Cisco Unified CMEThe eXtensible Markup Language (XML) Application Programming Interface (API) is supported in CiscoUnified Communications Manager Express (Cisco Unified CME) 8.5 and later versions.

    Configure the XML API1

  • Target AudienceThis chapter assumes that you have knowledge of a high-level programming language, such as C++, Java, oran equivalent language. You must also have knowledge or experience in the following areas:

    • TCP/IP Protocol

    • Hypertext Transport Protocol

    • Socket programming

    • XML

    In addition, users of this programming guide must have a firm grasp of XML Schema, which is used to definethe AXL requests, responses, and errors. For more information on XML Schema, see XML Schema Part 0:Primer Second Edition.

    Prerequisites• For Cisco Unified CME: XML API must be configured in Cisco Unified CME. For configurationinformation, see Configure the XML API, on page 1 of the Cisco Unified CME Administrator Guide.

    Information on XML API for Cisco Unified CMEThe XML API support in Cisco Unified CME provides a mechanism for inserting, retrieving, updating, andremoving data from the Cisco router using XML.

    Request methods are XML structures that are passed to the XML server in Cisco Unified CME andCisco Unified SRST applications using HTTP POST. The XML server receives the XML structures andexecutes the request. If the request completes successfully, then the appropriate XML response is returned.

    Querying for multiple entities in a single request can fail because of the XML buffer size limitation. Becauseof this limitation, the application must adjust its granularity to query one entity per request.

    Note

    Table 1: XML API Methods: Request and Response, on page 2 lists the request and response methods forthe XML API along with the purpose and parameters for each method.

    Table 1: XML API Methods: Request and Response

    ResponseParameterRequestDescription

    System

    ISexecCLIResultcommandISexecCLIExecute configurationcommands

    ISSaveConfigResult—ISSaveConfigSave router configuration tonvram

    SCCP

    Configure the XML API2

    Configure the XML APITarget Audience

    https://www.w3.org/TR/xmlschema-0/https://www.w3.org/TR/xmlschema-0/

  • ResponseParameterRequestDescription

    ISGlobal—ISgetGlobalGet system status forCisco Unified CME orCisco Unified SRST.

    ISDevicesAny combination of thefollowing:

    ISDevID

    ISDevName

    ISKeyword:

    • all

    • allTag

    • available

    ISgetDeviceGet status of an IP phone

    ISDeviceTemplatesAny combination of thefollowing:

    ISDevTemplateID

    ISKeyword:

    • all

    • allTag

    • available

    ISgetDeviceTemplateGet configuration of a phonetemplate

    ISExtensionsAny combination of thefollowing:

    ISExtID

    ISExtNumber

    ISKeyword:

    • all

    • allTag

    • available

    ISgetExtensionGet configuration of anextension

    ISExtensionTemplatesAny combination of thefollowing:

    ISExtTemplateID

    ISKeyword:

    • all

    • allTag

    • available

    ISgetExtensionTemplateGet configuration of anextension template

    Configure the XML API3

    Configure the XML APIInformation on XML API for Cisco Unified CME

  • ResponseParameterRequestDescription

    ISuserISuserIDISgetUserGet user information

    ISUserProfilesAny combination of thefollowing:

    ISUserProfileID

    ISuserID

    ISKeyword:

    • all

    • allTag

    • available

    ISgetuserProfileGet user profile information

    ISUtilityDirectory—ISgetUtilityDirectoryGet configuration for utilitydirectory

    SIP

    ISSipGlobal—ISgetVoiceRegGlobalGet system status for aCisco Unified CME runningSIP

    ISSipDevicesAny combination of thefollowing:

    ISPoolID

    ISPoolName

    ISKeyword:

    • all

    • allTag

    • available

    ISgetSipDeviceGet status of an IP phone

    ISSipExtensionsAny combination of thefollowing:

    ISVoiceRegDNID

    ISVoiceRegNumber

    ISKeyword:

    • all

    • allTag

    • available

    ISgetSipExtensionGet configuration of anextension

    Configure the XML API4

    Configure the XML APIInformation on XML API for Cisco Unified CME

  • ResponseParameterRequestDescription

    ISSessionServersAny combination of thefollowing:

    ISSessionServerID

    ISSessionServerName

    ISKeyword:

    • all

    • allTag

    • available

    ISgetSessionServerGet status of a session server

    ISVoiceHuntGroupsISVoiceHuntGroupID

    ISKeyword:

    • all

    • allTag

    • available

    ISgetVoiceHuntGroupGet status of voice huntgroups

    ISPresenceGlobal—ISgetPresenceGlobalGet configuration for Presence

    Examples for XML API MethodsThis section contains examples for the following XML API methods:

    System

    • ISexecCLI

    • ISSaveConfig

    SCCP IP Phones

    • ISgetGlobal

    • ISgetDevice

    • ISgetDeviceTemplate

    • ISgetExtension

    • ISgetExtensionTemplate

    • ISgetUser

    • ISgetUserProfile

    • ISgetUtilityDirectory

    SIP IP Phones

    Configure the XML API5

    Configure the XML APIExamples for XML API Methods

  • • ISgetVoiceRegGlobal

    • ISgetSipDevice

    • ISgetSipExtension

    • ISgetSessionServer

    • ISgetVoiceHuntGroup

    • ISgetPresenceGlobal

    ISexecCLIUse ISexecCLI to execute a list of Cisco IOS commands on the Cisco router. The request must include theCLI parameter with the Cisco IOS command string for each command to be executed.

    Request

    ephone 4mac-address 000D.BC80.EB51type 7960button 1:1

    Response

    The value of “0” for ISexecCLIResponse in the following example is the response when the request is completedsuccessfully.

    0

    The following example shows the response when the request fails. The value of ISexecCLIResponse identifieswhich line number in the request failed. Any subsequent commands in the list of commands are not executed.All preceding commands in the list were executed.

    Configure the XML API6

    Configure the XML APIISexecCLI

  • 4 invalid input dn parameter for button 1

    ISSaveConfigUse ISSaveConfig to save the running configuration on a router to the startup configuration on the same router.

    Request

    Response

    The following example shows that the ISSaveConfig request was successfully completed.

    success

    The following example shows the response when the request fails.

    fail

    The following example shows that response when the request is delayed, typically because there is anotherterminal session connected to Cisco Unified CME. The running configuration will be saved later by abackground process after all other terminal sessions are disconnected.

    delay

    ISgetGlobalUse ISgetGlobal to retrieve system configuration and status information for the Cisco Unified CME system.

    Request

    Response

    10.4.188.90ITS7.201947030

    Configure the XML API7

    Configure the XML APIISSaveConfig

  • 32740.0.0.0ngm-28002000810481806050

    EPHONE_URL_INFOhttp://1.4.188.101/localdir

    EPHONE_URL_DIRECTOREIEShttp://1.4.188.101/localdir

    EPHONE_URL_MESSAGEShttp://1.4.188.101/localdir

    EPHONE_URL_SERVICEShttp://1.4.188.101/localdir

    EPHONE_URL_PROXYSERVhttp://1.4.188.101/localdir

    EPHONE_URL_IDLEttp://1.4.188.101/localdir

    EPHONE_URL_AUTHhttp://1.4.188.101/localdir

    11234

    223457-24

    Nov1212:0013:00

    Mon

    Configure the XML API8

    Configure the XML APIISgetGlobal

  • 12:0013:00

    true

    2222

    122

    calling

    1testtest

    17093anl

    0

    2120123480

    true

    1

    123

    2.T

    false

    true

    Configure the XML API9

    Configure the XML APIISgetGlobal

  • truetrue

    *1true

    truefalsefalse

    flash:/its/true

    perphonetype

    Unknown

    true

    mm-dd-yynone

    112344

    falsefalse

    212334

    truefalse

    3123241111falsefalse

    412314

    falsetrue

    1

    Configure the XML API10

    Configure the XML APIISgetGlobal

  • 1234directory

    last-name-first

    false

    truetrue12:00 00:-1 -1:-1

    true

    provision-tag

    true

    callfwd all**10

    callfwd cancel**20

    pickup local**30

    pickup group**40

    pickup direct**50

    park**60

    dnd**70

    redial**8

    Configure the XML API11

    Configure the XML APIISgetGlobal

  • 0

    voicemail**90

    ephone-hunt join*30

    ephone-hunt cancel#30

    ephone-hunt hlog*40

    ephone-hunt hlog-phone*50

    trnsfvm*60

    dpark-retrieval*00

    cancel call waiting*10

    true

    HLog

    tftp://223.255.254.253/ngm/huntgp/2800/data

    -10

    Configure the XML API12

    Configure the XML APIISgetGlobal

  • 024

    5

    15

    -1

    0media

    1signal

    2video

    3service

    4media

    5media

    6media

    7media

    8media

    9media

    10media

    Configure the XML API13

    Configure the XML APIISgetGlobal

  • 11media

    12media

    13media

    14media

    15media

    16media

    17media

    18media

    19media

    20media

    10.4.188.9020001.4.188.900true

    3030

    999

    hehehehehehehehehehehehehehehehehehe

    Configure the XML API14

    Configure the XML APIISgetGlobal

  • SCCP11.9-0-1FT6-4DEVheheheheheheheheheheheheheheheheP00308000501heheheheheheSCCP41.8-4-2-38Shehehehehehehehehehehehehehehehehehehehe

    flash:its/vrf1/XMLDefaultCIPC.cnf.xmlcnf.xmlfalse

    15015

    6024:0

    8-6

    1800secondary

    4810

    100

    118

    120

    Configure the XML API15

    Configure the XML APIISgetGlobal

  • flash:music-on-hold.au10000

    239.10.10.102000

    110.10.10.10

    truetrue

    0US

    1US

    2US

    3US

    4US

    everyday*234

    1Jan112:0014:00

    1Sun12:0016:00

    2Mon12:0016:00

    Configure the XML API16

    Configure the XML APIISgetGlobal

  • 3Tue12:0016:00

    4Wed12:0016:00

    5Thu12:0016:00

    6Fri12:0016:00

    7Sat12:0016:00

    12:0016:00

    12:0016:00

    12:0016:00

    1234truetruefalse

    dual-stackipv4

    124234false

    4

    1mtp-conf

    Configure the XML API17

    Configure the XML APIISgetGlobal

  • 4

    1

    4567

    truefalsefalse

    falsefalse

    truefalse

    1displayOnTimetime.xml

    ngmngm

    ngmngm

    LITTLE TWIN STARS (2800)

    12false0

    1010180012

    new-call

    1....false

    2.Tfalse

    Configure the XML API18

    Configure the XML APIISgetGlobal

  • full-consultfalse

    false

    http://1.4.188.101/localdir

    http://1.4.188.101/localdir

    http://1.4.188.101/localdir

    http://1.4.188.101/localdir

    http://1.4.188.101/localdir

    http://1.4.188.101/localdir90

    http://1.4.188.101/localdir

    0USen

    1USen

    2USen

    3USen

    4USen

    Configure the XML API19

    Configure the XML APIISgetGlobal

  • 10000000

    6050

    Admin-1

    ngm5$1$.nfD$zn3h3bp/4grULFS87ZHHV/

    ciscocisco0

    ISgetDeviceUse ISgetDevice to retrieve configuration and status information for IP phones.

    Use any combination of the following parameters in the request message to specific one or more SCCP phones:

    • ISDevID with the ephone tag number of SCCP phone to be queried.

    • ISDevName with the MAC address of SCCP phone to be queried.

    • ISKeyword with one of the following options:

    • all—All configured SCCP phones

    • allTag—Ephone tag numbers for all SCCP phones configured

    • available—Next available ephone tag number to be configured

    Request:

    1SEP0012DA8AC43DallKeyphone

    Configure the XML API20

    Configure the XML APIISgetDevice

  • Response

    1SEP0016C7C7AF9DOthers7911test

    1MONITOR_RING

    false

    false

    falsefalse

    g711ulawfalse

    true

    true

    falsefalse

    11234home LINE

    1Dnd

    2Flash

    truefalsetruetrue

    falsefalsetruetrue

    Configure the XML API21

    Configure the XML APIISgetDevice

  • true

    false

    false

    false

    0000

    3030

    none

    truefalsefalse

    park

    0multicast

    11234home

    ngmngm

    7911

    17914

    normal0

    11234blfsd

    true

    Configure the XML API22

    Configure the XML APIISgetDevice

  • 1

    7777ephoneOnenone

    true

    1

    1

    0true10

    truetrue

    1234

    true

    1testtesttrueSEP0016C7C7AF9D

    0.0.0.0

    11766176falseidle

    falsetrue00

    unregistereddeceased40400

    Configure the XML API23

    Configure the XML APIISgetDevice

  • no

    ISgetDeviceTemplateUse ISgetDeviceTemplate to retrieve configuration and status information for IP phone templates.

    Use any combination of the following parameters in the request message to specify one or more phonetemplates:

    • ISDevTemplateID with phone template tag number to be queried.

    • ISKeyword with one of the following options:

    • all—All configured phone templates

    • allTag—Phone template tag numbers for all configured phone templates

    • available—Next available phone template tag number to be configured

    Request

    1

    Response

    1

    112347-24

    Jan112:0014:00

    Mon12:0014:00

    Configure the XML API24

    Configure the XML APIISgetDeviceTemplate

  • true

    true

    1234

    false0

    1,9line

    4-5,7speed-dial

    2-3feature

    11url

    false

    g711ulawfalse

    false

    false

    falsefalse

    11234office

    1HLog

    2Park

    3Privacy

    Configure the XML API25

    Configure the XML APIISgetDeviceTemplate

  • 1em

    3myphoneapp

    6servicehellohelloworld

    Pickup Park GPickup

    falsefalsefalsefalse

    falsefalse

    truetrue-1

    falsetruefalse

    false

    displayOnTime170

    CBarge Newcall

    false

    false

    0000000

    Configure the XML API26

    Configure the XML APIISgetDeviceTemplate

  • 3030

    none

    falsetruetrue

    1234

    0multicast

    11234play

    testtest

    7960

    17914

    1httpHTTP

    ISgetExtensionUse ISgetExtension to retrieve configuration and status information for extension numbers.

    Use any combination of the following parameters in the request message to specify one or more extensions:

    • ISExtID with the extension ID number to be queried.

    • ISExtNumber with the extension number to be queried.

    • ISKeyword with one of the following options:

    • all—Displays details of all extension numbers configured

    • allTag—Displays a list of all extension ID numbers configured

    Configure the XML API27

    Configure the XML APIISgetExtension

  • • available—Next available extension ID number to be configured

    Request

    11

    Response

    160016111normalup312273300.0.0.00EFXS 50/0/1DUAL_LINEIDLEfalse1111105

    true

    1

    ephoneDnOne1234

    8

    true

    1234

    9000secondaryfalse

    2323

    Configure the XML API28

    Configure the XML APIISgetExtension

  • 123480true

    truetrue

    true

    truetrue

    ephoneDnOne

    15idletrue

    8

    0

    qsig

    both

    0

    12

    inout

    callingcalling

    falsefalsefalse

    false

    0true

    Configure the XML API29

    Configure the XML APIISgetExtension

  • 0.0.0.000.0.0.0

    true

    false

    truefalsetrue

    0false

    0

    00

    false

    0.0.0.000.0.0.0

    ephoneDnOnefalse

    60016111true

    0.0.0.00

    false

    00

    false

    true

    00

    false

    Configure the XML API30

    Configure the XML APIISgetExtension

  • 09

    180

    externalprimary

    1

    1111105

    30

    ISgetExtensionTemplateUse the ISgetExtensionTemplates to retrieve configuration and status information for extension templates.

    Use any combination of the following parameters in the request message to specify one or more extensions:

    • ISExtTemplateID with the extension template ID number to be queried.

    • ISKeyword with one of the following options:

    • all—Displays details of all configured extension templates

    • allTag—Displays a list of all configured extension template ID numbers

    • available—Next available extension template ID number to be configured

    Request

    1

    Configure the XML API31

    Configure the XML APIISgetExtensionTemplate

  • Response

    1

    false

    1234

    3456primaryfalse

    4

    7777

    999980falsesecondary

    truetrue

    true

    true

    falsefalse

    ephoneDnTemplate

    15idletrue

    8

    0

    sipon-off

    both1

    Configure the XML API32

    Configure the XML APIISgetExtensionTemplate

  • 400

    10

    11

    ISgetUserUse ISgetUser to retrieve information for a particular user in Cisco Unified CME. The request must includethe ISuserID parameter with a user name that is configured in Cisco Unified CME. If the request contains avalid ISuserID, the response includes the user-name tag number (ISuserTag) and type for this user.

    The value for ISuserType corresponds to how a username is configured in Cisco Unified CME, as follows:

    • 0—INVALID_CME_USER

    • 1—EPHONE_USER

    • 2—LOGOUT_PROFILE_USER

    • 3—USER_PROFILE_USER

    If the request contains an invalid ISuserID, the value for ISuserTag and ISuserType will both be “0.”

    Request

    a

    Response

    a31

    ISgetUserProfileUse the ISgetUserProfile to retrieve the status and configuration information for a specific user profile.

    Use any combination of the following:

    • ISUserProfileID with the user profile ID of a specific user.

    • ISuserID with user ID of a specific user.

    Configure the XML API33

    Configure the XML APIISgetUser

  • • ISKeyword with one of the following options:

    • all—Displays details of all configured user profiles.

    • allTag—Displays a list of all configured user profile IDs.

    • available—Next available user profile.

    Request

    1

    Response

    1aa12no0

    1901

    no

    2902

    no

    320022002Labelno

    520042004yes

    2003NORMAL0no

    Configure the XML API34

    Configure the XML APIISgetUserProfile

  • 201NORMAL0no

    202NORMAL0no

    Unknown0

    ISgetUtilityDirectoryUse the ISgetUtilityDirectory to retrieve status and configuration information for directory information.

    Request

    Response

    112345firstlast

    267890first2last 2

    ISgetVoiceRegGlobalUse the ISgetVoiceRegGlobal to retrieve status and configuration information of global parameters for SIP,

    Request

    Configure the XML API35

    Configure the XML APIISgetUtilityDirectory

  • Response

    10.10.10.1cme7.1

    ood_referpresence

    5060101005

    ISgetSipDeviceFor SIP phones, use any combination of the following parameters in the request message to specify one ormore SIP phones:

    • ISPoolID with the voice register pool tag number of SIP phone to be queried.

    • ISPoolName with the voice register pool name of the SIP phone to be queried.

    • ISKeyword with one of the following options:

    • all—All configured SIP phones

    • allTag—Voice register pool tag numbers for all configured SIP phones

    • available—Next available phone tag number to be configured

    Request

    1

    Response

    10013.1978.3CA50

    0

    Configure the XML API36

    Configure the XML APIISgetSipDevice

  • 11901idle

    22902idle

    42rtp-nteg729r8

    ISgetSipExtensionUse ISgetSipExtension to retrieve configuration and status information for extension numbers.

    Use any combination of the following parameters in the request message to specify one or more extensions:

    • ISVoiceRegDNID with the extension ID number to be queried.

    • ISVoiceRegNumber with the extension number to be queried.

    • ISKeyword with one of the following options:

    • all—Displays details of all configured extension numbers

    • allTag—Displays a list of all configured extension ID numbers

    • available—Next available extension ID number to be configured

    Request

    1

    Response

    1901

    12

    trueHenry

    Configure the XML API37

    Configure the XML APIISgetSipExtension

  • Mann

    12

    ISgetSessionServerUse ISgetSessionServer to retrieve configuration information for session servers in Cisco Unified CME.

    Use any combination of the following parameters in the request message to specify one or more sessionservers:

    • ISSessionServerID with the session server tag number.

    • ISSessionserverName with session server name.

    • ISKeyword with one of the following keywords:

    • all—All configured session servers

    • allTag—Session server tag numbers for all configured session servers

    • available—Next available session server tag number to be configured

    Request

    1

    Response

    1SS160

    ISgetVoiceHuntGroupUse the ISgetVoiceHuntGroupID to retrieve status and configuration information for voice hunt groups.

    Use any combination of the following parameters in the request message to specify one or more voice huntgroups:

    • ISVoiceHuntGroupID with the voice hunt group ID number.

    • ISKeyword with one of the following keywords:

    Configure the XML API38

    Configure the XML APIISgetSessionServer

  • • all—All configured voice hunt groups

    • allTag—Voice hunt group ID numbers for all configured voice hunt groups

    • available—Next available voice hunt group ID number to be configured

    Request

    1

    Response

    1longest-idle2002000

    -102

    201202

    1802

    ISgetPresenceGlobalUse ISgetPresenceGlobal to retrieve configuration information and status for the presence engine inCisco Unified CME.

    Request

    Response

    truecme

    Configure the XML API39

    Configure the XML APIISgetPresenceGlobal

  • truetrue100false

    Configure XML API

    The following Cisco IOS commands that were previously used with the XML interface are no longer valid:log password, xmltest, xmlschema, and xmlthread.

    Note

    Define XML Transport ParametersTo define the XML transport method and associated parameters, perform the following steps.

    SUMMARY STEPS

    1. enable2. configure terminal3. ip http server4. ixi transport http5. response size fragment-size6. request outstanding number7. request timeout seconds8. no shutdown9. end

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example: • Enter your password if prompted.Router> enable

    Enters global configuration mode.configure terminal

    Example:

    Step 2

    Router# configure terminal

    Enables the Cisco web browser user interface on the localCisco Unified CME router.

    ip http server

    Example:

    Step 3

    Router(config)# ip http server

    Configure the XML API40

    Configure the XML APIConfigure XML API

  • PurposeCommand or Action

    Specifies the XML transport method and entersXML-transport configuration mode.

    ixi transport http

    Example:

    Step 4

    • http—HTTP transport.Router(config)# ixi transport http

    Sets the response buffer size.response size fragment-sizeStep 5

    Example: • fragment-size—Size of fragment in the response buffer,in kilobytes. Range is constrained by the transport typeRouter(conf-xml-trans)# response size 8and platform. See the CLI help for the valid range ofvalues.

    Sets the maximum number of outstanding requests allowedfor the transport type.

    request outstanding number

    Example:

    Step 6

    • number—Number of requests. Range is constrainedby the transport type and platform. See the CLI helpfor the valid range of values.

    Router(conf-xml-trans)# request outstanding 2

    Sets the number of seconds to wait, while processing arequest, before timing out.

    request timeout seconds

    Example:

    Step 7

    • seconds—Number of seconds. Range is 0 to 60.Router(conf-xml-trans)# request timeout 30

    Enables HTTP transport.no shutdown

    Example:

    Step 8

    Router(conf-xml-trans)# no shutdown

    Returns to privileged EXEC mode.end

    Example:

    Step 9

    Router(config-xml-app)# end

    Define XML Application ParametersTo set a response timeout for communication with the XML application that overrides the setting in transportconfiguration mode, perform the following steps.

    SUMMARY STEPS

    1. enable2. configure terminal3. ixi application cme4. response timeout {-1 | seconds}5. no shutdown6. end

    Configure the XML API41

    Configure the XML APIDefine XML Application Parameters

  • DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example: • Enter your password if prompted.Router> enable

    Enters global configuration mode.configure terminal

    Example:

    Step 2

    Router# configure terminal

    Enters XML-application configurationmode for configuringCisco IOS XML infrastructure parameters for theCisco Unified CME application.

    ixi application cme

    Example:Router(config)# ixi application cme

    Step 3

    This command defines URL of Cisco Unified CME XMLserver ashttp:///ios_xml_app/cme.

    Note

    Sets a timeout for responding to the XML application andoverwrites the IXI transport level timeout.

    response timeout {-1 | seconds}

    Example:

    Step 4

    • -1—No application-specific timeout is specified. Thisis the default.

    Router(config-xml-app)# response timeout 30

    • seconds—Length of timeout, in seconds. Range is0 to 60.

    Enables XML communication with the application.no shutdown

    Example:

    Step 5

    Router(conf-xml-app)# no shutdown

    Returns to privileged EXEC mode.end

    Example:

    Step 6

    Router(config-xml-app)# end

    Define Authentication for XML AccessTo authenticate users for XML access, perform the following steps:

    SUMMARY STEPS

    1. enable2. configure terminal3. telephony-service4. xml user user-name password password privilege-level5. end

    Configure the XML API42

    Configure the XML APIDefine Authentication for XML Access

  • DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example: • Enter your password if prompted.Router> enable

    Enters global configuration mode.configure terminal

    Example:

    Step 2

    Router# configure terminal

    Enters telephony-service configuration mode.telephony-service

    Example:

    Step 3

    Router(config)# telephony-service

    Defines an authorized user.xml user user-name password password privilege-levelStep 4

    Example: • user-name—Unique alphanumeric string that isauthorized user name.Maximum length of string is 19characters.

    Router(config-telephony)# xml user user23 password3Rs92uzQ 15

    • password—Alphanumeric string to use for access.Maximum length of string is 19 characters.

    • privilege-level—Level of access to Cisco IOScommands to be granted to this user. Only thecommands with the same or a lower level can beexecuted via XML. Range is 0 (lowest) to 15 (highest).

    Returns to privileged EXEC mode.end

    Example:

    Step 5

    Router(config-telephony)# end

    Define XML Event Table ParametersThe XML event table is an internal buffer that stores captured and time-stamped events, such as phonesregistering and unregistering and extension status. One event equals one entry in the table. To set the maximumnumber of events or entries that can be stored in the XML event table and the length of time that events areretained before they are deleted from the table, perform the following steps.

    SUMMARY STEPS

    1. enable2. configure terminal3. telephony-service4. log table max-size number5. log table retain-timer minutes6. end

    Configure the XML API43

    Configure the XML APIDefine XML Event Table Parameters

  • 7. show fb-its-log8. clear telephony-service xml-event-log

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example: • Enter your password if prompted.Router> enable

    Enters global configuration mode.configure terminal

    Example:

    Step 2

    Router# configure terminal

    Enters telephony-service configuration mode.telephony-service

    Example:

    Step 3

    Router(config)#

    Sets the number of entries in the XML event table.log table max-size numberStep 4

    Example: • number—Number of entries. Range is 0 to 1000.Default is 150.Router(config-telephony)# log table max-size 100

    Sets the number of minutes to retain entries in the eventtable before they are deleted.

    log table retain-timer minutes

    Example:

    Step 5

    • minutes—Number of minutes. Range is 2 to 500.Default is 15.

    Router(config-telephony)# log table retain-timer30

    Returns to privileged EXEC mode.end

    Example:

    Step 6

    Router(config-telephony)# end

    Displays the event logs.show fb-its-log

    Example:

    Step 7

    Router# show fb-its-log

    Clears XML event logs.clear telephony-service xml-event-log

    Example:

    Step 8

    Router# clear telephony-service xml-event-log

    Troubleshooting the XML Interface• Use the debug cme-xml command to view debug messages for the Cisco Unified CME XML interface.

    Configure the XML API44

    Configure the XML APITroubleshooting the XML Interface

  • Configuration Examples for XML API

    Example for XML Transport ParametersThe following example selects HTTP as the XML transport method:

    ip http serverixi transport httpresponse size 8request outstanding 2request timeout 30no shutdown

    Example for XML Application ParametersThe following example sets the application response timeout to 30 seconds.

    ixi application cmeresponse timeout 30no shutdown

    Example for XML AuthenticationThe following example selects HTTP as the XML transport method. It allows access for user23 with thepassword 3Rs92uzQ, and sets up access list 99 that accepts requests from the IP address 192.168.146.72.ixi transport http

    ip http server!telephony-servicexml user user23 password 3Rs92uzQ 15

    Example for XML Event TableThe following example sets the maximum number of entries in the XML event table to 100 and the numberof minutes to retain entries at 30:telephony-service

    log table max-size 100log table retain-timer 30

    Where to Go NextFor developer information on the XML API, see XML Provisioning Guide for Cisco CME/SRST.

    Configure the XML API45

    Configure the XML APIConfiguration Examples for XML API

    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/xml/developer/guide/xmldev.html

  • Feature Information for XML APIThe following table provides release information about the feature or features described in this module. Thistable lists only the software release that introduced support for a given feature in a given software releasetrain. Unless noted otherwise, subsequent releases of that software release train also support that feature.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Table 2: Feature Information for XML API

    Feature InformationCisco Unified CMEVersion

    Feature Name

    The XML API was modified and is now provided through theCisco IOS XML infrastructure. It supports allCisco Unified CME features.

    4.0Call BlockingBased on Date andTime

    The XML API was introduced.3.0

    The log password, xmltest, xmlschema, and xmlthreadcommands were deprecated.

    12.6

    Configure the XML API46

    Configure the XML APIFeature Information for XML API

    http://www.cisco.com/go/cfn

    Configure the XML APIInformation About XML APIXML API DefinitionXML API Provision Using IXIXML API for Cisco Unified CMETarget AudiencePrerequisitesInformation on XML API for Cisco Unified CMEExamples for XML API MethodsISexecCLIISSaveConfigISgetGlobalISgetDeviceISgetDeviceTemplateISgetExtensionISgetExtensionTemplateISgetUserISgetUserProfileISgetUtilityDirectoryISgetVoiceRegGlobalISgetSipDeviceISgetSipExtensionISgetSessionServerISgetVoiceHuntGroupISgetPresenceGlobal

    Configure XML APIDefine XML Transport ParametersDefine XML Application ParametersDefine Authentication for XML AccessDefine XML Event Table ParametersTroubleshooting the XML Interface

    Configuration Examples for XML APIExample for XML Transport ParametersExample for XML Application ParametersExample for XML AuthenticationExample for XML Event Table

    Where to Go NextFeature Information for XML API