Dialed Number API

Dialed Number API

You can use the Dialed Number API to list the dialed numbers currently defined in the database, define new dialed numbers, and view, edit, or delete records of existing dialed numbers.


Note


Multiple dialed number records are created for each external dialed number, with one for each routing client.

Dialed Number API Commands

This section explains the five supported API operations for Dialed Number and their parameters.

API Parameters

The following table shows the parameters for Dialed Number API:

Parameter Name

Description

dialedNumberString

The Dialed Number string.

description

Additional information about the Dialed Number.

routingType

1 (External Voice), 2 (Internal Voice), 3 (Outbound), 4 (Multichannel)

Note    Externally Dialed Numbers are Dialed Numbers that apply to calls coming from Unified CVP, which create four separate Dialed Number Records, one for each of the Unified CVP Routing Clients. The calls are referred to as external because typically they come from outside of the enterprise through a gateway.

Note    Internally Dialed Numbers are Dialed Numbers that can be called from a Unified CM phone. The calls must have a Route Point on Unified CM that corresponds to the Internally Dialed Number. They are referred to as internal because they can only be accessed by Unified CM. Each Internally Dialed Number creates a single Dialed Number Record tied to the Unified CM routing client.

Outbound Dialed Numbers are used by the Outbound Option Dialer. They are referenced when creating the outbound campaign configuration in the Campaign Skill Group selection.

Multichannel Dialed Numbers are used by Email and Web Collaboration.

A Dialed Number Record is a record stored in the configuration database.

changeStamp

Incremented when the record is changed in the database (read-only).

callType refURL

A reference to a Call Type.

Dialed Number Record(s)

Routing client names that the Dialed Number string is associated with (read-only).

mediaRoutingDomain

Media Routing Domain for the Dialed Number.

create

Creates one Dialed Number and stores it in the database.


Note


Creation of an external Dialed Number will use every routing client in the system to create that number of routing clients, even if there are not four routing clients. If there are not four, this fact is logged.

Note


If the <dialedNumberRecord> element is supplied, it is ignored, because it is read-only, and only available on GET.

Note


Dialed Number has a capacity rule specified. If you create an object that exceeds the capacity for Dialed Number, an error will result.

URL:

https://<server>/unifiedconfig/config/dialednumber/

HTTP Method:

POST

Parameters:

See API Parameters.

Example XML Request Payload:

<dialedNumber>
  <description>test dialed number</description>
  <dialedNumberString>8885551212</dialedNumberString>
  <routingType>1|2</routingType>
  <callType>
    <refURL>[/unifiedconfig/config/calltype/(id)]</refURL>
  </callType>
</dialedNumber>


Response:

In the Response, the Location header has a URL to the newly created Dialed Number, if successful.

HTTP/1.1 201 Created
Content-Length: 0
Content-Type: text/plain
Location: https://<server>/unifiedconfig/config/dialedNumber/(id)
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 18 Oct 2011 10:31:31 GMT

See also HTTP Responses.

Operation Validation:

dialedNumberString

  • Required field.
  • Valid values: alphanumeric, +, and @.
  • Max length of 25 bytes allowed (Seven reserved internally for EnterpriseName prefix that identifies the routing client).
Note    Note: The dialedNumberString could also be OB, to refer to an outbound Skill Group, for example.

description

  • Optional field.
  • Max length of 255 bytes allowed.
  • No restriction of characters.
  • For details on valid characters for this field, see Internationalization.

routingType

  • Required field.
  • Values are:
    • 1 (External Voice)
    • 2 (Internal Voice)
    • 3 (Outbound)
    • 4 (Multichannel)

callType

  • Optional field.
  • Must be a refURL for a valid Call Type.

mediaRoutingDomain

  • Optional field for Routing Types 1-3.
  • Required field for Routing Type 4 (Multichannel).
  • Cisco_Voice for Routing Types 1-3.
  • Cannot be set to Cisco_Voice for Routing Type 4 Media Routing Domains.
  • User-defined value for Routing Type 4.
Note    Note: the user-defined type must be defined in the Media Routing Domain table.

delete

Deletes one Dialed Number from the database.


Note


The delete command not only deletes t_Dialed_Number records, but also any t_Dialed_Number_Map records related to the t_Dialed_Number.

Note


The delete only marks the record for deletion, it does not permanently delete the Dialed Number.

URL:

https://<server>/unifiedconfig/config/dialednumber/<id>

HTTP Method:

DELETE

Response:

See also HTTP Responses.

Operation Validation:

You cannot delete any Dialed Number that is:

  • Referenced by an Agent Team.
  • Referenced by an Agent's Desk Settings.
  • Referenced by a script.

list

Retrieves a list of Dialed Numbers.


Note


For external Dialed Numbers, the list command only lists the Dialed Number with the lowestDialedNumberID value.

URL:

https://<server>/unifiedconfig/config/dialednumber

HTTP Method:

GET

Example XML Response:

<results>
<pageInfo>
....
</pageInfo>
<dialedNumbers>
<dialedNumber>...</dialedNumber>
<dialedNumber>...</dialedNumber>
</dialedNumbers >
</results>

Note    The preceding example XML response does not show all of the data for pagination. See Pagination.

Note    Also, the example XML response does not show permissions information. See Permissions Information.

See also HTTP Responses.

routingType:<type> Search Parameter:

In addition to the standard search, q=string, which searches the dialedNumberString and description fields, the Dialed Number API also supports adding the q=routingType:<type> string to the query string.

The following restrictions apply:

  • Valid types are the integers:
    • 1 (External Voice)
    • 2 (Internal Voice)
    • 3 (Outbound)
    • 4 (Multichannel)
  • Only one type can be specified in a query.
  • You can add the routingType:<type> query to a regular search query. For example: q=routingType:1 123.
  • The routingType:<type> parameter must be the first parameter of the search string.

get

Returns one Dialed Number from the database.


Note


In the case of an external Dialed Number, you must specify the smallest Dialed Number for that bank of Dialed Numbers to retrieve it.

URL:

https://<server>/unifiedconfig/config/dialednumber/<id>

HTTP Method:

GET

Example XML Response:

<dialedNumber>
  <refURL>[/unifiedconfig/config/dialedNumber/(id)]</refURL>
  <description>test dialed number</description>
  <dialedNumberString>8885551212</dialedNumberString>
  <routingType>1</routingType>
  <changeStamp>0</changeStamp>
  <mediaRoutingDomain>
    <refURL>[/unifiedconfig/config/mediaroutingdomain/1]<refURL>
    <name>Cisco_Voice</name>
  </mediaRoutingDomain>
  <callType>
    <refURL>[/unifiedconfig/config/calltype/(id)]</refURL>
    <name>calltype name</name>
  </callType>
  <dialedNumberRecords>
    <dialedNumberRecord>
      <id>10</id>
      <name>cvp1rc.8885551212</name>
    </dialedNumberRecord>
    <dialedNumberRecord>
      <id>11</id>
      <name>cvp2rc.8885551212</name>
    </dialedNumberRecord>
    <dialedNumberRecord>
      <id>12</id>
      <name>cvp3rc.8885551212</name>
    </dialedNumberRecord>
    <dialedNumberRecord>
      <id>13</id>
      <name>cvp4rc.8885551212</name>
    </dialedNumberRecord>
  </dialedNumberRecords>
</dialedNumber>

See HTTP Responses.

Exceptions:

Note    If retrieving an external (IVR) Dialed Number and not all of the four t_Dialed_Number records are present, an error is logged to the Tomcat log, and an HTTP status code of 404 (not found) is returned to the caller.

update

Updates one Dialed Number in the database.


Note


If the <dialedNumberRecord> element is supplied, it is ignored, as it is read-only, and only available on GET.

URL:

https://<server>/unifiedconfig/config/dialednumber/<id>

HTTP Method:

PUT

Example XML Request Payload:

<dialedNumber>
  <description>test dialed number</description>
  <dialedNumberString>8885551212</dialedNumberString>
  <routingType>1|2</routingType>
  <changeStamp>0</changeStamp>
  <callType>
    <refURL>[/unifiedconfig/config/calltype/(id)]</refURL>
    <name>calltype name</name>
  </callType>
</dialedNumber>

Response:

See HTTP Responses.

Operation Validation:

All of the restrictions from the preceding create section apply, in addition to the following restrictions:

refURL

  • Required field.
  • Must refer to a valid Dialed Number.

changeStamp

  • Required field.
  • Integers only: start with 0.

Asynchronous API

See section on Asynchronous API.


Note


For Dialed Number API, the Asynchronous feature is supported only for the create, update, and delete operations.