EDI (Enhanced Directory Integration) can use the logged on user domain credentials to search LDAP directory, or a saved set of credentials in either the Service Profile or jabber-config.xml via the <ConnectionUsername> and <ConnectionPassword> tags. It’s only supported with Jabber for Windows since it uses the built-in Windows API.

BDI (Basic Directory Integration) uses stored credentials in either the Service Profile or jabber-config.xml via the <BDIConnectionUsername> and <BDIConnectionPassword> tags to search LDAP directory. Storing credentials in the service profile is highly recommended, since the jabber-config.xml is plaintext.

When both service profile and jabber-config.xml define a parameter, the service profile will take priority.

UDS (User Directory Service) uses CUCM to provide directory lookup services. UDS is the only supported method when MRA is used, however because CUCM is now providing directory lookups and not LDAP, the load must be considered: a node can support UDS contact service connections for up to 50% of the maximum device registrations supported by the server.

jabber-directory

Multiple Unity Connection Clusters may be networked together to provide cross-server features such as sign-in, transfer and live reply. An example would be a dial by name in a company directory being able to search multiple clusters and route the call appropriately.

First thing you’ll need is to define a route pattern in CUCM that will point to each Unity cluster. The CSS of each Unity Connection cluster should have access to this route pattern. In the following example I will use: ##991 to Site A and ##992 to Site B.

Next, add a HTTP(S) link under Networking, Branch Management. This adds the site under Networking, Locations. Notice you’ll only need to do this on one cluster- it will automatically add it to the neighbor cluster.

Now you’ll add the route pattern you created in step one to each cluster’s respective locations and check both “Allow Cross-Server..” options. This is the target dial string, so the route pattern going to site B will go on site A’s cluster.

Under Advanced, Conversations you’ll need to check “Respond to Cross-Server Handoff Requests”

OK at this point you can check under Users and you should see users from both clusters to tell you HTTP(s) networking is working, but before we can make the features work, take the steps below to create some partitioning:

  1. Create a “hidden” and an “intersite” partition on both clusters.
  2. Create a site-specific “reply-all” search space including each sites default partition (it’s own first, then its neighbors) and the intersite partition.
  3. Create a shared “master distribution list” search space, including all partitions, starting with site specific partitions, then the intersite partition, then the hidden.
  4. Rename the system distribution list on each cluster and change it to use the hidden partition.
  5. Create a new “master distribution list” to use the master distribution list partition.
  6. Change the system directory handler to use the new master distribution list search space

Now we just need to configure the clusters to respond to cross cluster requests. This uses a series of dtmf codes to hand the call off between servers. You’ll need to run the following via CLI to enable this:

run cuc dbquery unitydirdb execute procedure csp_ConfigurationCreate
(pName=’HandoffForwardRemoteForward’::lvarchar, pParentFullName=’System.Conversations.CrossBox’::lvarchar, pType=11, pValueBool=1, pRequiresRestart=1)

run cuc dbquery unitydirdb execute procedure csp_ConfigurationModify (pName=’HandoffForwardRemoteForward’::lvarchar, pParentFullName=’System.Conversations.CrossBox’::lvarchar, pValueBool=1)

Almost done – the only thing left is a call handler to answer the call.

  1. Copy the opening greeting to create a “CrossCluster_CallHandler.
    1. Under caller input, uncheck “ignore further input” under #.
  2. Create a Direct Routing Rule.
    1. Condition “Dialed Number Equals ##992” (this is what it answers to)
    2. “Send Call to” should go to the “CrossCluster_CallHandler”

See the official documentation here

Conference Now is a new feature in CUCM 11.0 for ad-hoc authenticated meet-me within CUCM without the need for any other application such as WebEx or UCCX.

Both internal and external callers can use Conference Now. The host needs the meeting number (their primary DN) and pin, while the participants only need the meeting number (access code is optional) and will hear MOH until host has joined.

First thing- you’ll notice a new link in 11.0. Media Resources > Interactive Voice Response, this was created automatically when I upgraded from 10.5. You’ll need to ensure these resources are made available to all parties.

Next, User Management > End User, enable the feature for each host, and add an optional attendee access code.

Last, Call Routing > Conference Now, setup the conference now number and partition. Interesting enough the documentation says that Video on Hold is not supported, but I was able to get this to work simply by leaving MOH Source to <none>.

Read the Official Feature Configuration Guide for CUCM 11.0

So for a g711 call with default payload carried over ethernet:

Total Packet Size: 40 + 18 + 160 = 218 bytes = 1744 bits

PPS = 64,000 (bitrate) / 1280 (payload size) = 50

Bandwidth = 1744 * 50 = 87,200 (or 87.2 kbps)

You could also use the Voice Bandwidth Calculator from TAC:
https://tools.cisco.com/Support/VBC/do/CodecCalc1.do

Sometimes working with a large amount of phones (10,000+) it can take a whole day to export into a csv, and makes more sense to view and manipulate data in the live database. Caution should be taken when handling the live database, so if you are not a programmer, you may want to stick to the canned scripts below as an overly broad query could lock up your server!

I was recently tasked with running firmware updates on a large amount of phones, various models for over 100 device pools. Anything that can help organize and divide workload and cut down on unnecessary bulk jobs is a huge help!

UC Guerilla has a good blog on this here
Cisco’s documentation you can find here, but a tough read for a non-programmer

Count the number of devices per type, total:

run sql select count(Device.name) Device_count, typemodel.name Device_Type from Device inner join typemodel on device.tkmodel=typemodel.enum group by typemodel.name

Count the number of phones in each device pool, sorted by device pool name:

run sql select count(d.name), dp.name as DevicePool, tc.name as DeviceType from Device as d inner join DevicePool as dp on d.fkDevicePool=dp.pkid inner join typeClass as tc on tc.enum=d.tkClass group by dp.name, tc.name order by dp.name

Count the number of each type of phone per device pool, sorted by device pool name:

run sql select count(Device.name) Device_count, DevicePool.name Device_Pool, typemodel.name Device_Type from Device inner join DevicePool on Device.fkDevicePool=DevicePool.pkid inner join typemodel on device.tkmodel=typemodel.enum group by DevicePool.name,typemodel.name order by DevicePool.name

 

ILS is a new feature service in CUCM 9.0 that allows for sharing of Directory-URIs between clusters.

A Directory URI is much like an email address, formatted like jlevensailor@ciscolab.com where jlevensailor is the user portion and ciscolab.com is the host portion. The user portion is actually case sensitive, but only in the context of CUCM, and is actually an enterprise parameter that can be set to fix this.

The internet uses dns via _sip._udp/tcp or _sips._tls SRV records to route calls between Directory URIs much like email uses mx records. CUCM uses sip route patterns for Directory URIs much like they use standard route patterns for DNs. To tell CUCM that a particular Directory URI is on-net within a particular multi-cluster environment, ILS was introduced.

*It is recommended to first change the Cluster ID enterprise parameter in both clusters to something unique.

To get started, I’ll assume you have a sip trunk has been created already between the two clusters, directly or via SME. Go to Advanced Features and ILS Configuration.

You’ll change the role to “Hub Cluster” and enter the corresponding clusters domain name or ip-address in the popup. For authentication you can either use TLS certificates and exchange certs (default), or you can use a password. Note: The password does require a restart of the ILS service, in case you were already running this.

The advertised route string is what you will create a sip route pattern for on the other cluster, pointing to the ICT so calls can work. When you are done, you can go ahead and start the service if you haven’t already, wait until synchronization finishes and run a route plan report to confirm:

As you can see, any URI on the remote hub cluster will be discovered, not just those that happen to match the advertised route string, which by default is the cluster FQDN.

The call flow is: nbates@car.lab wants to call test@dur.lab. CUCM checks the CSS of nbates@car.lab and proceeds to search for the URI in the list of ordered partitions as usual. When it finds test@dur.lab, it sees that it is a “Learned URI” from sbcucm.dur.lab, and uses the target from the sip route pattern of “dur.lab” I created to call the remote user.

The benefit of this is that sip route patterns won’t have to be created for each remote domain, just one for each ILS partner cluster. I would imagine you’ll start seeing a blank sip route pattern pointed to VCS/Expressway-C for outside domains and a specific ILS route pattern for internal domains/on-net traffic.

Official Documentation HERE

After a googley search, I was lead astray by an older posting on audio file conversion.

I needed to import an odd audio format file into an MOH file on Cisco Call Manager running v 9.x.

I Used Audacity ! from Source Forge !
Changed the sample rate to 8000 – , it was in MONO already – so no issue there. Then exported to OTHER Uncompressed type then OPTIONS – I chose WAV (Microsoft) and U-Law Encoding.
Saved and imported into Call Manger – Call Mangler converted it however it needed to and then it seemed to work !

Wished it were easier – just had to find the right combo –
Ultimately – Cisco wants it in 8000 hz rate/ U-law MONO WAV type.

hope this helps others in a pinch.

Another real easy way to get LIVE audio into a Cisco Voice system is to just use Unity Voicemail that forwards voice messages to an email account. Simply record a voice mail message as the Call handler, on hold message, greeting, etc. and you have an instant audio file in your inbox ready to upload to any system you might be working on. This is especially convenient when you don’t have Vocie Prompt dial-in access.
Again – useful in some situations.

Unity Connection can be integrated with CUCM using 2 methods, SCCP or SIP, the high level differences and similarities are detailed below;

SCCP Integration

  • Requires SCCP Ports, along with Line Group,  Hunt List & Hunt Pilot
  • Has dedicated DNs for MWI on/off

SIP Integration

  • Requires a SIP Trunk pointing to Unity Connection
  • Requires a route pattern to send calls to the SIP trunk (or a route group if there is a clustered Unity setup)
  • Does not require MWI DNs, uses SIP NOTIFY messages

Both integrations require a VM Pilot and a VM Profile. The VM Pilot is not a dialable DN/pattern, it’s more of a ‘speed dial’ for the phones to use, so when we change the VM profile for a DN it’s effectively a speed dial button for the VM pilot number references in the VM profile.

SCCP Integration – CUC Configuration
Firstly we have to create a ‘Phone System’ This is the highest-level element of the integration configuration, it will contain a port group which will then contain individual ports.

The options here control the integration between the two, including settings for MWIs (and the ability to initiate a synchronization in case the MWIs have become inconsistent for some reason). It also allows you to enable/disable loop detection (which is on by default), either by Extension (default) or by DTMF. Is it used to guard against scenarios such as breaking out of an auto-attendant system call handler to call a particular user and that DN they call is set to forward to VM because they are away from their desk. I need to add more information here.  The Phone View feature is controlled from here – enabling/disabling the feature along with the username/password for Unity Connection to use (must be an application user on CUCM with CTI control of the required devices) – along with outgoing call restrictions (unrestricted/blocked/blocked during a given time period)

You must also go to ‘Edit’ and select ‘CUCM AXL Servers’ and add the CUCM servers with their IPs or hostnames if CUC uses DNS, ensure the port is set to 8443. Add in the user/pass for AXL access (must be created in CUCM with the ‘Standard AXL access’ role) and hit ‘Test’ for each CUCM server to ensure there is no error.

Once this is done, the next step is to create a port group. A port group is given a name, a device name prefix along with more detailed MWI settings consisting of MWI On/MWI Off extensions and some timers for MWI. The defaults are pretty sane I think. The Device Name Prefix is important, as it must match at CUC and CUCM.

The port group configuration also allows you to specify CUCM & TFTP servers along with detailed timer settings to be used if there are issues with the integration (typically the defaults are sane and work fine with CUCM, but these settings may need changed if the integration is to another voice system like Asterix/FreePBX). Finally, you can also control the codecs that Unity Connection will advertise during the capabilities exchange of any call setup. The default appears to be G711ulaw and G722. iLBC/G711alaw/G729 are also available.

The final step is to create ports. These ports can have 4 functions enabled on each port; Answer calls/MWI notification/MWI requests/TRAP notifications. With this in mind, groups of ports could be assigned separate functions or all ports could be assigned all functions, although doing this means you may run in to issues in not being able to ensure that users will almost always be able to get a port for checking voicemail if everybody happened to be recording a new greeting using all ports there would be none free for VM-checking. If a group of ports were enabled for answering calls only, then these would only every be used for users calling in to Unity Connection (for VM/call handlers/etc).

SCCP Integration – CUCM  Configuration
There is a handy wizard at Advanced Features -> VM -> VM Port Wizard

First off, you enter the device name prefix. Ensure this matches what you configure at the CUC side, otherwise the ports will not register to CUCM correctly! Then you tell the wizard how many ports you want to create during the wizard.

When you hit next you are asked for the typical line/device information for the ports/DNs to be used, including Device Pool/CSS/Location/etc. The CSS for VM port devices/VM pot DNs is used by Unity Connection for calling out on any of these ports. Unity Connection has restriction tables that can block calls before they ever leave CUC, which is handy – we can give the ports full access but restrict it from the CUC side. Why do we set it twice in the wizard? Because a VM port is the same as any other ‘thing’ that can dial – it uses the line/device approach where the line and device are assigned a CSS.

After configuration the device/DNs you can chose to add the numbers to a new or existing line group, or do it manually. Thereafter you must add the line group to a hunt list, and add that hunt list to a hunt pilot. The hunt list must have the ‘for voicemail usage’ box ticket, although I’m not sure why. I wonder if I can find out…

Then we need to configure a VM Pilot and VM Profile. The VM pilot is the number used to dial in to Unity Connection. For an SCCP integration it is a number that is assigned a CSS that can reach the Hunt Pilot eventually containing the VM ports. This is then assigned to the VM profile assigned to each DN. I’m not sure why the VM Pilot has a CSS, does the calling party inherit that CSS when pressing the ‘Messages’ button or something? Update: from a bit of Googling, I think the CSS assigned there is used when a device forwards to voicemail.

We also need to ensure we configure the MWI On/MWI Off extensions in CUCM . Go to Advanced Features -> Voicemail -> Message Waiting and hit ‘add’ to add a new MWI DN, enter the number/partition/CSS and whether it is for on or off. Rather (un)helpfully, the MWI On icon is green and MWI off is red – despite the MWI light itself being red! The MWI DNs are assigned a partition which allows you to restrict whether users can dial the MWI directly (i.e the users devices/lines are assigned CSS’ that don’t contain the partition they are in). Unity Connection dials these with a spoofed calling number/ANI of the DN we wish to set an MWI for (I belive!), then CUCM signals that DN to display MWI. The voicemail port CSS must be able to reach the MWI DNs for this to work!

SIP Integration – CUC Configuration

Add a new port group, ensure the type is set to ‘SIP’ rather than ‘SCCP’ the default port/protocol settings are usually ok, add the IPv4 address of the CUCM at the bottom. Hit save and then click on the related link to add ports. You can also at this stage go to ‘Edit’ and add details for any other CUCM servers so it isn’t reliant on the single server configured on the main page. A reset of the port group is required after this.

We must then create ports the same as we do with SCCP, this is because this is a licensing requirement in Unity Connection – it is how they limit the number of calls in to the system.

Done! =D

SIP Integration – CUCM Configuration

Create a SIP trunk (default service type of ‘none’), give it a name/device pool/etc. Ensure inbound significant digits is set to all and the CSS’ and AAR settings are valid to ensure any outcall to the PSTN works. Disable outbound calling/called party xforms unless required. Ensure ‘Redirecting iversion header delivery – outbound’ is ticked so that the RDNIS info is included in the setup messages.

Enter the IP of the CUC server as the destination. Hit save & reset the trunk.

At this point, we need to create a new SIP Trunk Security Profile and ensure the following settings are selected;

  • Accept Out-of-Dialog REFER
  • Accept unsolicited notification
  • Accept replaces header

If we’re creating a new SIP Trunk Security Profile for other Cisco UC Applications, it may make sense to also tick the box that mentions ‘SUBSCRIBE’ (I can’t remember the exact wording of it off the top of my head!) – it will be required for CUPS.

Assign this new SIP Security Profile to the SIP trunk & reset.

Next, create a route pattern that matches the VM pilot, set the destination to be the CUC SIP Trunk and hit save. Untick any PSTN settings.

Credit goes to http://protocol41.wordpress.com for this one!

Often when troubleshooting an issue, having a good test can take a while to get ready. With CSIM, an undocumented IOS command, it is possible to simulate an outbound call, originating from your voice gateway directly. Use the csim start dialstring hidden command to initiate simulated calls to whichever real-world E.164 number is desired. This allows you to determine whether you can properly go offhook, send digits, and complete a call to the destination phone.

2951-VGW#debug isdn q931
debug isdn q931 is              ON.
2951-VGW#csim start 19105557245
csim: called number = 19105557245, loop count = 1 ping count = 0

Apr 13 22:19:42.179: ISDN Se0/1/0:23 Q931: Sending SETUP  callref = 0x09CD callID = 0x8955 switch = primary-ni interface = User
Apr 13 22:19:42.179: ISDN Se0/1/0:23 Q931: TX -> SETUP pd = 8  callref = 0x09CD
Bearer Capability i = 0x8090A2
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA98397
Exclusive, Channel 23
Called Party Number i = 0x80, ‘19105557245’
Plan:Unknown, Type:Unknown
Apr 13 22:19:42.227: ISDN Se0/1/0:23 Q931: RX <- CALL_PROC pd = 8  callref = 0x89CD
Channel ID i = 0xA98397
Exclusive, Channel 23
Apr 13 22:19:44.863: ISDN Se0/1/0:23 Q931: RX <- PROGRESS pd = 8  callref = 0x89CD
Progress Ind i = 0x8188 – In-band info or appropriate now available
Apr 13 22:19:52.376: ISDN Se0/1/0:23 Q931: RX <- CONNECT pd = 8  callref = 0x89CD
Apr 13 22:19:52.376: ISDN Se0/1/0:23 Q931: TX -> CONNECT_ACK pd = 8  callref = 0x09CD
csim err csimDisconnected recvd DISC cid(42503)
csim: loop = 1, failed = 1
csim: call attempted = 1, setup failed = 1, tone failed = 0
Apr 13 22:19:57.144: ISDN Se0/1/0:23 Q931: RX <- DISCONNECT pd = 8  callref = 0x89CD
Cause i = 0x8290 – Normal call clearing
Apr 13 22:19:57.144: ISDN Se0/1/0:23 Q931: TX -> RELEASE pd = 8  callref = 0x09CD
Apr 13 22:19:57.156: ISDN Se0/1/0:23 Q931: RX <- RELEASE_COMP pd = 8  callref = 0x89CDter no mo
Apr 13 22:19:58.741: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:

Despite the call working in this case CSIM will always display failed=1.  There is no real explanation for this.

If the call does not complete, you could perform a “show dial-peer voice sum” to match dialed digits, or my favorite “show dialplan number

2911-VGW#show dialplan num 19105557245
Macro Exp.: 19105557245

VoiceOverIpPeer1000
peer type = voice, system default peer = FALSE, information type = voice,
description = `SIP_OUT_11_DIGIT’,
tag = 1000, destination-pattern = `1[2-9]………’,
voice reg type = 0, corresponding tag = 0,
allow watch = FALSE
answer-address = `’, preference=0,
CLID Restriction = None
CLID Network Number = `’
CLID Second Number sent
CLID Override RDNIS = disabled,
rtp-ssrc mux = system
source carrier-id = `’, target carrier-id = `’,
source trunk-group-label = `’,  target trunk-group-label = `’,
numbering Type = `unknown’
group = 1000, Admin state is up, Operation state is up,
incoming called-number = `’, connections/maximum = 0/unlimited,
bandwidth/maximum = 0/unlimited,
DTMF Relay = enabled,
modem transport = disabled,
URI classes:
Incoming (Request) =
Incoming (Via) =
Incoming (To) =
Incoming (From) =
Destination =
huntstop = disabled,
in bound application associated: ‘DEFAULT’
out bound application associated: ”
dnis-map =
permission :both
incoming COR list:maximum capability
outgoing COR list:minimum requirement
outgoing LPCOR:
Translation profile (Incoming):
Translation profile (Outgoing):
incoming call blocking:
translation-profile = `’
disconnect-cause = `no-service’
advertise 0x40 capacity_update_timer 25 addrFamily 4 oldAddrFamily 4
mailbox selection policy: none
type = voip, session-target = `sip-server’,
technology prefix:
settle-call = disabled
ip media DSCP = cs5, ip media rsvp-pass DSCP = ef
ip media rsvp-fail DSCP = ef, ip signaling DSCP = cs4,
ip video rsvp-none DSCP = af41,ip video rsvp-pass DSCP = af41
ip video rsvp-fail DSCP = af41,
ip defending Priority = 0, ip preemption priority = 0
ip policy locator voice:
ip policy locator video:
UDP checksum = disabled,
session-protocol = sipv2, session-transport = system,
req-qos = best-effort, acc-qos = best-effort,
req-qos video = best-effort, acc-qos video = best-effort,
req-qos audio def bandwidth = 64, req-qos audio max bandwidth = 0,
req-qos video def bandwidth = 384, req-qos video max bandwidth = 0,
dtmf-relay = sip-notify,
dtmf-relay = rtp-nte,
RTP dynamic payload type values: NTE = 101
Cisco: NSE=100, fax=96, fax-ack=97, dtmf=121, fax-relay=122
CAS=123, TTY=119, ClearChan=125, PCM switch over u-law=0,
A-law=8, GSMAMR-NB=117 iLBC=116, AAC-ld=114, iSAC=124
lmr_tone=0, nte_tone=0
h263+=118, h264=119
G726r16 using static payload
G726r24 using static payload
RTP comfort noise payload type = 19
fax rate = disable,   payload size =  20 bytes
fax protocol = system
fax-relay ecm enable
Fax Relay ans enabled
Fax Relay SG3-to-G3 Enabled (by system configuration)
fax NSF = 0xAD0051 (default)
codec = g711ulaw,   payload size =  160 bytes,
video codec = None
voice class codec = `’
voice class sip session refresh system
voice class sip rsvp-fail-policy voice post-alert mandatory keep-alive interval 30
voice class sip rsvp-fail-policy voice post-alert optional keep-alive interval 30
voice class sip rsvp-fail-policy video post-alert mandatory keep-alive interval 30
voice class sip rsvp-fail-policy video post-alert optional keep-alive interval 30
voice class sip profiles = 1
text relay = disabled
Media Setting = forking (disabled) flow-through (global)stats-disconnect (disabled)
Expect factor = 10, Icpif = 20,
Playout Mode is set to adaptive,
Initial 60 ms, Max 1000 ms
Playout-delay Minimum mode is set to default, value 40 ms
Fax nominal 300 ms
Max Redirects = 1, signaling-type = cas,
VAD = disabled, Poor QOV Trap = disabled,
Source Interface = NONE
voice class sip url = system,
voice class sip tel-config url = system,
voice class sip rel1xx = system,
voice class sip anat = system,
voice class sip outbound-proxy = “system”,
voice class sip associate registered-number = system,
voice class sip asserted-id system,
voice class sip privacy system
voice class sip e911 = system,
voice class sip history-info = system,
voice class sip reset timer expires 183 = system,
voice class sip pass-thru headers = system,
voice class sip pass-thru content unsupp = system,
voice class sip pass-thru content sdp = system,
voice class sip copy-list = system,
voice class sip g729 annexb-all = system,
voice class sip early-offer forced = enable,
voice calss sip delay-offer forced = disable,
voice class sip negotiate cisco = system,
voice class sip block 180 = system,
voice class sip block 183 = system,
voice class sip block 181 = system,
voice class sip preloaded-route = system,
voice class sip random-contact = system,
voice class sip random-request-uri validate = system,
voice class sip call-route p-called-party-id = system,
voice class sip call-route history-info = system,
voice class sip call-route url = system,
voice class sip privacy-policy send-always = system,
voice class sip privacy-policy passthru = system,
voice class sip privacy-policy strip history-info = system,
voice class sip privacy-policy strip diversion = system,
voice class sip send 180 sdp = system,
voice class sip map resp-code 181 = system,
voice class sip bind control = system,
voice class sip bind media = system,
voice class sip bandwidth audio = system,
voice class sip bandwidth video = system,
voice class sip encap clear-channel = system,
voice class sip error-code-override options-keepalive failure = system,
voice class sip error-code-override cac-bandwidth failure = system,
voice class sip calltype-video = false
voice class sip registration passthrough = System
voice class sip authenticate redirecting-number  = system,
voice class sip referto-passing = system,
redirect ip2ip = disabled
local peer = false
probe disabled,
Secure RTP: system (use the global setting)
mobility=0, snr=, snr_noan=, snr_delay=0, snr_timeout=0
snr calling-number local=disabled, snr ring-stop=disabled, snr answer-too-soon timer=0
voice class perm tag = `’
Time elapsed since last clearing of voice call statistics never
Connect Time = 303893, Charged Units = 0,
Successful Calls = 37, Failed Calls = 9, Incomplete Calls = 0
Accepted Calls = 0, Refused Calls = 0,
Bandwidth CAC Accepted Calls = 0, Bandwidth CAC Refused Calls = 0,
Last Disconnect Cause is “10  “,
Last Disconnect Text is “normal call clearing (16)”,
Last Setup Time = 510566383.
Last Disconnect Time = 510567472.
Matched: 19105557245   Digits: 2   Matched pattern: 1[2-9]………
Target: sip-server

Sometimes your asked to tune down certain hosts only during business hours to conserve bandwidth. I always tell them the easiest way to control this is at the switch at a physical level using tcl scripts and scheduled kron jobs. In this example, the port is limited to 1MB at 8:00 AM daily, but the limit is removed at 5:00PM.

First, create the script

You can do this in notepad and upload using tftp. I prefer using the cli directly:

switch#tclsh
switch(tcl)#puts [open “flash:portlimit1.tcl” w+] { ios_config “interface Gi1/0/10” “speed 10” “bandwidth 10” “srr-queue bandwidth limit 10” }
switch(tcl)#puts [open “flash:portlimit0.tcl” w+] { ios_config “interface Gi1/0/10” “speed 1000” “bandwidth 1000” “no srr-queue bandwidth limit 10” }

Next, define the kron policies

kron policy-list turnUp
tclsh portlimit0.tcl

kron policy-list turnDown
tclsh portlimit1.tcl

Then, schedule the kron job

kron occurence open at 08:00 recurring
policy-list turnDown

kron occurence closed at 17:00 recurring
policy-list turnUp