Operational Data

Using the cisco-IOS-XE-voice-oper module, you can get the operational data of a router.

Operational Data-Registration

The following provides an example for getting the registration information of phones.

Sample Operational Data of Phones Registration

Request

<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1b3aa91d-f594-4538-b557-0e0077fb8031"><get>
    <filter>
        <voice-oper-data>
            <voice-reg-phone-info/>
        </voice-oper-data>
    </filter>
</get></nc:rpc>

Response

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5561470c-52c9-4f2e-8224-53f0660bcbbf" 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<data><voice-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-voice-oper"><voice-reg-phone-info>
<pool-tag>1</pool-tag>
 <id-network>8.0.0.0</id-network>
  <reg-state>reg-state-registered</reg-state>
   <voice-reg-line-info>
   <dialpeer-tag>40001</dialpeer-tag>
   <address>8.43.25.205</address>
   <dir-number>11105$</dir-number>
   </voice-reg-line-info>

   <voice-reg-line-info>
   <dialpeer-tag>40002</dialpeer-tag>
   <address>8.43.25.204</address>
   <dir-number>11104$</dir-number>
   </voice-reg-line-info>

   <voice-reg-line-info>
   <dialpeer-tag>40003</dialpeer-tag>
   <address>8.43.25.203</address>
   <dir-number>11103$</dir-number>
   </voice-reg-line-info>

   <voice-reg-line-info>
   <dialpeer-tag>40004</dialpeer-tag>
   <address>8.43.25.202</address>
   <dir-number>11102$</dir-number>
   </voice-reg-line-info>

</voice-reg-phone-info>
</voice-oper-data></data>
</rpc-reply>

Field Descriptions

Field Description X-path Remarks
Pool Tag Shows the assigned tag number of the current pool. /voice-oper-data/voice-reg-phone-info/pool-tag N/A
Network address and Mask Shows network address and mask information when the id command is configured. /voice-oper-data/voice-reg-phone-info/id-network {"patterns":["(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"],"datatype":"inet:ipv4-address"} {"patterns":["((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?","(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?"],"datatype":"inet:ipv6-address"}
reg-state Shows the registration status /voice-oper-data/voice-reg-phone-info/reg-state N/A
dialpeer-tag Dial-peer sequence number. /voice-oper-data/voice-reg-phone-info/voice-reg-line-info/dialpeer-tag N/A
address IP address of the phone /voice-oper-data/voice-reg-phone-info/voice-reg-line-info/address {"patterns":["(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"],"datatype":"inet:ipv4-address"} {"patterns":["((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?","(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?"],"datatype":"inet:ipv6-address"}
dir-number Directory number /voice-oper-data/voice-reg-phone-info/voice-reg-line-info/dir-number N/A

Operational Data for Calls

The following provides an example for getting the operational information for voice calls that are in progress.

Sample Operational Data for Calls

Request

<?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ab2e2c8d-09d7-45c4-8aa5-3c3416ecec18"><get>
    <filter>
        <voice-oper-data>
            <active-voip-call-summary/>
        </voice-oper-data>
    </filter>
</get></nc:rpc>

Response

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ab2e2c8d-09d7-45c4-8aa5-3c3416ecec18" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <voice-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-voice-oper">
    <active-voip-call-summary>
      <telephony-call-legs>1</telephony-call-legs>
      <sip-call-legs>1</sip-call-legs>
      <total-call-legs>2</total-call-legs>
      <active-voip-call-details>
        <call-index>1</call-index>
        <call-setuptime>2019-08-13T22:05:28.54348+00:00</call-setuptime>
        <call-id>87</call-id>
        <call-type>telephony-call-leg</call-type>
        <bridge-id>4698</bridge-id>
        <peer-id>20001</peer-id>
        <direction>incoming-leg</direction>
        <directory-number>1000</directory-number>
        <call-state>active-state</call-state>
        <call-duration>10090</call-duration>
        <transmit-packets>0</transmit-packets>
        <transmit-bytes>0</transmit-bytes>
        <receive-packets>466</receive-packets>
        <receive-bytes>93200</receive-bytes>
        <remote-media-port>0</remote-media-port>
        <codec>voip-codec-none</codec>
      </active-voip-call-details>
      <active-voip-call-details>
        <call-index>1</call-index>
        <call-setuptime>2019-08-13T21:16:23.195432+00:00</call-setuptime>
        <call-id>88</call-id>
        <call-type>voip-call-leg</call-type>
        <bridge-id>4698</bridge-id>
        <peer-id>40004</peer-id>
        <direction>outgoing-leg</direction>
        <directory-number>11102</directory-number>
        <call-state>active-state</call-state>
        <call-duration>10100</call-duration>
        <transmit-packets>465</transmit-packets>
        <transmit-bytes>93000</transmit-bytes>
        <receive-packets>0</receive-packets>
        <receive-bytes>0</receive-bytes>
        <remote-ip-address>8.43.25.202</remote-ip-address>
        <remote-media-port>11486</remote-media-port>
        <codec>voip-codec-g711ulaw</codec>
      </active-voip-call-details>
    </active-voip-call-summary>
  </voice-oper-data>
</data>

Field Descriptions

Field Description X-path Remarks
call-index Index of the call leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-index N/A
call-setuptime Call leg setup time /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-setuptime Pattern: "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})"
call-id Unique ID of the call leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-id N/A
call-type Call leg type. /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-type N/A
bridge-id Unique ID for call. /voice-oper-data/active-voip-call-summary/active-voip-call-details/bridge-id N/A
peer-id Dial-peer ID. /voice-oper-data/active-voip-call-summary/active-voip-call-details/peer-id N/A
direction Incoming leg or outgoing leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/direction N/A
directory-number Directory Number (DN) of this call leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/directory-number N/A
call-state State of this call leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-state N/A
call-duration Call duration. /voice-oper-data/active-voip-call-summary/active-voip-call-details/call-duration N/A
transmit-packets Number of packets transmitted. /voice-oper-data/active-voip-call-summary/active-voip-call-details/transmit-packets N/A
transmit-bytes Number of bytes transmitted. /voice-oper-data/active-voip-call-summary/active-voip-call-details/transmit-bytes N/A
receive-packets Number of packets received. /voice-oper-data/active-voip-call-summary/active-voip-call-details/receive-packets N/A
receive-bytes Number of bytes received. /voice-oper-data/active-voip-call-summary/active-voip-call-details/receive-bytes N/A
remote-ip-address Call leg remote IP address. /voice-oper-data/active-voip-call-summary/active-voip-call-details/remote-ip-address Pattern: {"patterns":["(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"],"datatype":"inet:ipv4-address"} {"patterns":["((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?","(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?"],"datatype":"inet:ipv6-address"}
remote-media-port Call leg remote media port. /voice-oper-data/active-voip-call-summary/active-voip-call-details/remote-media-port N/A
codec VOIP codec negotiated on the leg. /voice-oper-data/active-voip-call-summary/active-voip-call-details/codec N/A