Showing posts with label Communications Manager. Show all posts
Showing posts with label Communications Manager. Show all posts

Wednesday, 15 February 2017

Finding Phones With Incorrect CSS

SQL queries can be used to quickly report on common configuration mistakes that build up over time, such as having the wrong CSS on a phone for the device pool it is in, simply plug in the correct values & run the query from the CLI. Using like in the SQL query means that it's also possible to use certain wildcards (e.g. % being zero or more characters) to aid in the search.

SELECT d.name, d.description, dp.name, css.name FROM device AS d INNER JOIN devicepool AS dp ON d.fkdevicepool = dp.pkid INNER JOIN callingsearchspace AS css ON d.fkcallingsearchspace = css.pkid WHERE dp.name LIKE 'DP-Frankfurt-Phones' AND css.name NOT LIKE 'CSS-Frankfurt-Unrestricted' ORDER BY d.name

The output will include the device name, device description, device pool name and CSS name:

admin:run sql SELECT d.name, d.description, dp.name, css.name FROM device AS d INNER JOIN devicepool AS dp ON d.fkdevicepool = dp.pkid INNER JOIN callingsearchspace AS css ON d.fkcallingsearchspace = css.pkid WHERE dp.name LIKE 'DP-Frankfurt-Phones' AND css.name NOT LIKE 'CSS-Frankfurt-Unrestricted' ORDER BY d.name
name            description     name        name
=============== =============== =================== ==================
SEPF09E636E5656 SEPF09E636E5656 DP-Frankfurt-Phones CSS-Frankfurt-CoR6
SEPF09E636E5657 SEPF09E636E5657 DP-Frankfurt-Phones CSS-Frankfurt-CoR6

Tuesday, 10 January 2017

CTI Manager Service Trace Reason Codes

Troubleshooting CTI traces can be a bit of a black art unlike the better documented CallManager service traces, as there aren't tools like TranslatorX to help with the interpretation.
Most of the problems with CTI can be resolved by using the short list below:

  • Application or end user is a member of the correct groups (e.g. Standard CTI Enabled)?
  • Application or end user has the correct devices associated?
  • CTI application server has the correct TSP driver version installed & configured?
  • CTI application is pointing at a server that is actually running the CTI Manager service?
  • If everything looks fine try restarting the CTI Manager service, it does get stuck sometimes

For the occasions where you do have to dig into the traces, first don't forget to set them to detailed for all servers.
Then a good place to start is to look for the phrase "reason code" in the traces. To get an idea of where to look next, take the reason code & convert it to hexadecimal, this can be done using the Calculator program included with Windows:

Strip the "FFFFFFFF" off the front & then search for the value in the list CTI Manager error codes in the section below.

For example:
47806170.003 |22:01:59.893 |AppInfo  |CtiProviderOpenFailure - CTI application failed to open provider; application startup failed CTIconnectionId:259  Login User Id:Someone Reason code.:-1932787595 UNKNOWN_PARAMNAME:IPAddress:10.140.74.114 UNKNOWN_PARAMNAME:IPv6Address: App ID:Cisco CTIManager Cluster ID:VS10 Node ID:VS11

 Reason code -1932787595 = FFFFFFFF8CCC0075 = error code 8CCC0075 = CTIERR_DIRECTORY_LOGIN_TIMEOUT.
In this instance the CTI control attempt failed due to the authentication of the user taking longer than the default 10s limit. Then we could proceed to looking at why the authentication timed out, such as searching through the traces for for the phrase "timeout" or the username listed before the reason code.

CTI Manager Reason Codes

CTI_S_OK 00000000
CTI_FAILURE 8CCC0000
CTI_FWD_TYPE_FWDALL 8CCC0001
CTI_NULL_CI 8CCC0002
CTIERR_TIMEOUT 8CCC0001
CTIERR_MEDIA_ALREADY_TERMINATED 8CCC0003
CTIERR_ILLEGAL_HANDLE 8CCC0004
CTIERR_UNDEFINED_LINE 8CCC0005
CTIERR_ILLEGAL_CALLINGPARTY 8CCC0006
CTIERR_CALL_AREADY_EXISTS 8CCC0007
CTIERR_LINECONTROL_FAILURE 8CCC0008
CTIERR_ILLEGAL_CALLSTATE 8CCC0009
CTIERR_CALLHANDLE_NOTINCOMINGCALL 8CCC000A
CTIERR_TRANSFERFAILED_DESTINATION_UNALLOCATED 8CCC000B
CTIERR_TRANSFERFAILED_DESTINATION_BUSY 8CCC000D
CTIERR_TRANSFERFAILED 8CCC000E
CTIERR_HOLDFAILED 8CCC000F
CTIERR_RETRIEVEFAILED 8CCC0011
CTIERR_DB_NO_MORE_DEVICES 8CCC0012
CTIERR_DEVICE_ALREADY_REGISTERED 8CCC0013
CTIERR_DB_ILLEGAL_DEVICE_TYPE 8CCC0014
CTIERR_DB_ERROR 8CCC0015
CTIERR_CANNOT_TERMINATE_MEDIA_ON_PHONE 8CCC0016
CTIERR_CALL_MANAGER_NOT_AVAILABLE 8CCC0017
CTIERR_ACCESS_TO_DEVICE_DENIED 8CCC0018
CTIERR_UNKNOWN_GLOBAL_CALL_HANDLE 8CCC0019
CTIERR_DEVICE_NOT_OPEN 8CCC001A
CTIERR_ASSOCIATED_LINE_NOT_OPEN 8CCC001B
CTIERR_SSAPI_NOT_REGISTERED 8CCC001C
CTIERR_REDIRECT_CALL_DOES_NOT_EXIST 8CCC001D
CTIERR_DEVICE_NOT_REGISTERED 8CCC001E
CTIERR_DATA_SIZE_LIMIT_EXCEEDED 8CCC001F
CTIERR_INVALID_RING_OPTION 8CCC0020
CTIERR_APP_SOFTKEYS_ALREADY_CONTROLLED 8CCC0021
CTIERR_INVALID_DEVICE_NAME 8CCC0022
CTIERR_INFORMATION_NOT_AVAILABLE 8CCC0023
CTIERR_MEDIA_RESOURCE_NAME_SIZE_EXCEEDED 8CCC0024
CTIERR_APPLICATION_DATA_SIZE_EXCEEDED 8CCC0025
CTIERR_INVALID_MEDIA_DEVICE 8CCC0026
CTIERR_CLOSE_DELAY_NOT_SUPPORTED_WITH_REG_TYPE 8CCC0027
CTIERR_REDIRECT_CALLINFO_ERR 8CCC0030
CTIERR_REDIRECT_ERR 8CCC0031
CTIERR_REDIRECT_CALL_CALL_TABLE_FULL 8CCC0032
CTIERR_REDIRECT_CALL_PROTOCOL_ERROR 8CCC0033
CTIERR_REDIRECT_CALL_UNKNOWN_DESTINATION 8CCC0034
CTIERR_REDIRECT_CALL_DIGIT_ANALYSIS_TIMEOUT 8CCC0035
CTIERR_REDIRECT_CALL_MEDIA_CONNECTION_FAILED 8CCC0036
CTIERR_REDIRECT_CALL_PARTY_TABLE_FULL 8CCC0037
CTIERR_REDIRECT_CALL_ORIGINATOR_ABANDONED 8CCC0038
CTIERR_REDIRECT_CALL_UNKNOWN_PARTY 8CCC0039
CTIERR_REDIRECT_CALL_INCOMPATIBLE_STATE 8CCC003A
CTIERR_REDIRECT_CALL_PENDING_REDIRECT_TRANSACTION 8CCC003B
CTIERR_REDIRECT_CALL_UNKNOWN_ERROR 8CCC003C
CTIERR_REDIRECT_CALL_NORMAL_CLEARING 8CCC003D
CTIERR_REDIRECT_CALL_UNRECOGNIZED_MANAGER 8CCC003E
CTIERR_REDIRECT_CALL_DESTINATION_BUSY 8CCC003F
CTIERR_REDIRECT_CALL_DESTINATION_OUT_OF_ORDER 8CCC0040
CTIERR_CANNOT_OPEN_DEVICE 8CCC0041
CTIERR_TRANSFERFAILED_TRANSFER_ALREADY_OUTSTANDING 8CCC0042
CTIERR_TRANSFERFAILED_CALLCONTROL_TIMEOUT 8CCC0043
CTIERR_CALLHANDLE_UNKNOWN_TO_LINECONTROL 8CCC0044
CTIERR_OPERATION_NOT_AVAILABLE_IN_CURRENT_STATE 8CCC0045
CTIERR_CONFERENCE_FULL 8CCC0046
CTIERR_MAX_NUMBER_OF_CTI_CONNECTIONS_REACHED 8CCC0047
CTIERR_CONSULTCALL_ALREADY_OUTSTANDING 8CCC0048
CTIERR_NO_CONFERENCE_BRIDGE 8CCC0049
CTIERR_TEMPORARY_FAILURE 8CCC004F
CTIERR_INCOMPATIBLE_PROTOCOL_VERSION 8CCC0050
CTIERR_UNRECOGNIZABLE_PDU 8CCC0051
CTIERR_ILLEGAL_MESSAGE_FORMAT 8CCC0052
CTIERR_INCOMPATIBLE_AUTOINSTALL_PROTOCOL_VERSION 8CCC0053
CTIERR_INVALID_MESSAGE_LENGTH 8CCC0054
CTIERR_INVALID_MESSAGE_HEADER_INFO 8CCC0055
CTIERR_MESSAGE_TOO_BIG 8CCC0056
CTIERR_INVALID_FILTER_SIZE 8CCC0057
CTIERR_DIRECTORY_TEMPORARY_UNAVAILABLE 8CCC005E
CTIERR_DIRECTORY_LOGIN_NOT_ALLOWED 8CCC005F
CTIERR_DIRECTORY_LOGIN_FAILED 8CCC0060
CTIERR_PROVIDER_NOT_OPEN 8CCC0061
CTIERR_PROVIDER_ALREADY_OPEN 8CCC0062
CTIERR_NOT_INITIALIZED 8CCC0063
CTIERR_CLUSTER_LINK_FAILURE 8CCC0064
CTIERR_LINE_INFO_DOES_NOT_EXIST 8CCC0065
CTIERR_DIGIT_GENERATION_ALREADY_IN_PROGRESS 8CCC0066
CTIERR_DIGIT_GENERATION_WRONG_CALL_HANDLE 8CCC0067
CTIERR_DIGIT_GENERATION_WRONG_CALL_STATE 8CCC0068
CTIERR_DIGIT_GENERATION_CALLSTATE_CHANGED 8CCC0069
CTIERR_RETRIEVEFAILED_ACTIVE_CALL_ON_LINE 8CCC0070
CTIERR_INVALID_LINE_HANDLE 8CCC0071
CTIERR_LINE_NOT_PRIMARY 8CCC0072
CTIERR_CFWDALL_ALREADY_SET 8CCC0073
CTIERR_CFWDALL_DESTN_INVALID 8CCC0074
CTIERR_DIRECTORY_LOGIN_TIMEOUT 8CCC0075
CTIERR_LINE_OUT_OF_SERVICE 8CCC0076
CTIERR_DEVICE_OUT_OF_SERVICE 8CCC0077
CTIERR_MSGWAITING_DESTN_INVALID 8CCC0078
CTIERR_DARES_INVALID_REQ_TYPE 8CCC0079
CTIERR_CONFERENCE_FAILED 8CCC007A
CTIERR_CONFERENCE_INVALID_PARTICIPANT 8CCC007B
CTIERR_CONFERENCE_ALREADY_PRESENT 8CCC007C
CTIERR_CONFERENCE_INACTIVE 8CCC007D
CTIERR_TRANSFER_INACTIVE 8CCC007E
CTIERR_REGISTER_FEATURE_ACTIVATION_FAILED 8CCC007F
CTIERR_UNSUPPORTED_CALL_PARK_TYPE 8CCC0080
CTIERR_CALL_UNPARK_FAILED 8CCC0081
CTIERR_INVALID_PARK_DN 8CCC0082
CTIERR_INVALID_PARK_REGISTRATION_HANDLE 8CCC0083
CTIERR_INVALID_MONITOR_DN_TYPE 8CCC0084
CTIERR_CALL_PARK_NO_DN 8CCC0085
CTIERR_ILLEGAL_DEVICE_TYPE 8CCC0086
CTIERR_CALL_REQUEST_ALREADY_OUTSTANDING 8CCC0087
CTIERR_CONSULT_CALL_FAILURE 8CCC0088
CTIERR_FEATURE_ALREADY_REGISTERED 8CCC0089
CTIERR_STATION_SHUT_DOWN 8CCC008A
CTIERR_INTERNAL_FAILURE 8CCC0090
CTIERR_MEDIAREGISTRATIONTYPE_DO_NOT_MATCH 8CCC0091
CTIERR_OPERATION_FAILED_QUIETCLEAR 8CCC0092
CTIERR_FEATURE_DATA_REJECT 8CCC0093
CTIERR_PRIMARY_CALL_DROPPED 8CCC0094
CTIERR_INVALID_DTMFDIGITS 8CCC0097
CTIERR_INCORRECT_MEDIA_CAPABILITY 8CCC0098
CTIERR_COMMAND_NOT_IMPLEMENTED_ON_DEVICE 8CCC0099
CTIERR_DEVICE_SHUTTING_DOWN 8CCC009A
CTIERR_INVALID_MEDIA_RESOURCE_ID 8CCC009B
CTIERR_UNKNOWN_EXCEPTION 8CCC009C
CTIERR_OPERATION_NOT_ALLOWED 8CCC009D
CTIERR_INVALID_MEDIA_PARAMETER 8CCC009E
CTIERR_MEDIA_CAPABILITY_MISMATCH 8CCC009F
CTIERR_DEVICE_ALREADY_OPENED 8CCC00A0
CTIERR_DEVICE_NOT_OPENED_YET 8CCC00A1
CTIERR_MEDIA_ALREADY_TERMINATED_NONE 8CCC00A2
CTIERR_MEDIA_ALREADY_TERMINATED_STATIC 8CCC00A3
CTIERR_MEDIA_ALREADY_TERMINATED_DYNAMIC 8CCC00A4
CTIERR_OWNER_NOT_ALIVE 8CCC00A5
CTIERR_RESOURCE_NOT_AVAILABLE 8CCC00B0
CTIERR_MEDIA_RESOURCE_ALREADY_EXISTS 8CCC00B1
CTIERR_UNKNOWN_MEDIA_RESOURCE 8CCC00B2
CTIERR_UNKNOWN_CI 8CCC00B3
CTIERR_INVALID_PARAMETER 8CCC00B4
CTIERR_ACTIVE_PORTS_EXCEED_REQUESTED_PORTS 8CCC00B5
CTIERR_INVALID_RESOURCE_TYPE 8CCC00B6
CTIERR_DUPLICATE_CALL_REFERENCE 8CCC00B7
CTIERR_NOT_PRESERVED_CALL 8CCC00B8
CTIERR_NO_EXISTING_MEDIA_RESOURCES 8CCC00B9
CTIERR_NO_RESPONSE_FROM_MP 8CCC00BA
CTIERR_SYSTEM_ERROR 8CCC00BB
CTIERR_REGISTER_FEATURE_PROVIDER_NOT_REGISTERED 8CCC00BC
CTIERR_REGISTER_FEATURE_APP_ALREADY_REGISTERED 8CCC00BD
CTIERR_PENDING_ACCEPT_OR_ANSWER_REQUEST 8CCC00C0
CTIERR_INVALID_MEDIA_PROCESS 8CCC00C1
CTIERR_CAPABILITIES_DO_NOT_MATCH 8CCC00C2
CTIERR_DEVICE_OWNER_ALIVE_TIMER_STARTED 8CCC00C3
CTIERR_MAXCALL_LIMIT_REACHED 8CCC00C4
CTIERR_CTIHANDLER_PROCESS_CREATION_FAILED 8CCC00C5
CTIERR_FEATURE_SELECT_FAILED 8CCC00C6
CTIERR_REDIRECT_UNAUTHORIZED_COMMAND_USAGE 8CCC00C7
CTIERR_NO_EXISTING_CALLS 8CCC00C8
CTIERR_UNSUPPORTED_CFWD_TYPE 8CCC00C9
CTIERR_FAC_CMC_REASON_FAC_NEEDED 8CCC00CA
CTIERR_FAC_CMC_REASON_CMC_NEEDED 8CCC00CB
CTIERR_FAC_CMC_REASON_FAC_CMC_NEEDED 8CCC00CC
CTIERR_FAC_CMC_REASON_FAC_INVALID 8CCC00CD
CTIERR_FAC_CMC_REASON_CMC_INVALID 8CCC00CE
CTIERR_PATH_PEPLACEMENT_INPROGRESS 8CCC00CF

Wednesday, 21 December 2016

Finding Lines With a Specified External Phone Number Mask

Via the power of SQL queries you can quickly determine what devices & lines have a specified external phone number mask. Handy for homing in on possible causes of calls with incorrect caller ID. Using like in the SQL query means that it's also possible to use certain wildcards (e.g. % being zero or more characters) to aid in the search.

select d.name, d.description, n.dnorpattern, dmap.e164mask from device as d inner join devicenumplanmap as dmap on dmap.fkdevice = d.pkid inner join numplan as n on dmap.fknumplan = n.pkid where dmap.e164mask like '%2081234567' order by d.name

The output will include the device name, device description, DN & external phone number mask of any matching devices & lines:

admin:run sql select d.name,d.description,n.dnorpattern,dmap.e164mask from device as d inner join devicenumplanmap as dmap on dmap.fkdevice=d.pkid inner join numplan as n on dmap.fknumplan=n.pkid where dmap.e164mask like '%2081234567' order by d.name
name            description     dnorpattern e164mask
=============== =============== =========== =============
SEPF09E636E5656 SEPF09E636E5656 1000        +442081234567
SEPF09E636E5657 SEPF09E636E5657 1001        +442081234567


Thursday, 12 February 2015

CUCM Pattern or Number Reference Finder

For some unknown reason you can't run dependency records on hunt pilots or route patterns, which makes tracking down references to them a pain if you've deleted or changed the number. Fortunately you can run SQL queries from the CLI to get around this. Below is an SQL query for CUCM 8.X+ that checks for CFA, CFB, CFNA, CFNC, CFUR, AAR Destination Mask or Called Party Transformation that reference a specified number (in this example 119063):


SELECT n.DNOrPattern, n.AlertingName, n.Description, n.tkPatternUsage FROM NumPlan AS n LEFT JOIN CallForwardDynamic AS cfd ON cfd.fkNumPlan = n.pkid WHERE n.CFAptDestination LIKE '119063' OR n.CFBDestination LIKE '119063' OR n.CFBIntDestination LIKE '119063' OR n.CFNADestination LIKE '119063' OR n.CFNAIntDestination LIKE '119063' OR n.PFFDestination LIKE '119063' OR n.PFFIntDestination LIKE '119063' OR n.CFURDestination LIKE '119063' OR n.CFURIntDestination LIKE '119063' OR n.AARDestinationMask LIKE '119063' OR n.CalledPartyTransformationMask LIKE '119063' OR cfd.CFADestination LIKE '119063' ORDER BY n.DNOrPattern ASC


The output will include the pattern, description, alerting name & pattern type for any dial plan elements that reference the given number:

admin: run sql SELECT n.DNOrPattern, n.AlertingName, n.Description, n.tkPatternUsage FROM NumPlan AS n LEFT JOIN CallForwardDynamic AS cfd ON cfd.fkNumPlan=n.pkid WHERE n.CFAptDestination LIKE '119063' OR n.CFBDestination LIKE '119063' OR n.CFBIntDestination LIKE '119063' OR n.CFNADestination LIKE '119063' OR n.CFNAIntDestination LIKE '119063' OR n.PFFDestination LIKE '119063' OR n.PFFIntDestination LIKE '119063' OR n.CFURDestination LIKE '119063' OR n.CFURIntDestination LIKE '119063' OR n.AARDestinationMask LIKE '119063' OR n.CalledPartyTransformationMask LIKE '119063' OR cfd.CFADestination LIKE '119063' ORDER BY n.DNOrPattern ASC

dnorpattern alertingname   description    tkpatternusage
=========== ============== ============== ==============
9063        Catarina Vidal Catarina Vidal 2 


The tkPatternUsage field lists the type of dial plan element, use the table below to interpret it:

tkPatternUsageDial Plan Element
0Call Park
1Conference
2Directory Number
3Translation Pattern
4Call Pick Up Group
5Route Pattern
6Message Waiting
7Hunt Pilot
8Voice Mail Port
9Domain Routing
10IP Address Routing
11Device template
12Directed Call Park
13Device Intercom
14Translation Intercom
15Translation Calling Party Number
16Mobility Handoff
17Mobility Enterprise Feature Access
18Mobility IVR
19Device Intercom Template
20Called Party Number Transformation
21Call Control Discovery Learned Pattern
22Uri Routing
23ILS Learned Enterprise Number
24ILS Learned E164 Number
25ILS Learned Enterprise Numeric Pattern
26ILS Learned E164 Numeric Pattern
27Alternate Number
28ILS Learned URI
29ILS Learned PSTN Failover Rule
30ILS Imported E164 Number

Monday, 18 February 2013

Communications Manager Tools Part 2

Troubleshooting using SDI/SDL traces from CUCM is a pain, in part because the tool within RTMT for doing this is pretty lame. Cisco do make the Voice Log Translator, which tidies up the presentation of traces & provides explanations of many of the fields, very useful! Unfortunately it's not been updated since 2010 & when I tried using it with CUCM 9.1 recently it didn't seem to understand many of the traces. Fortunately there are a couple of alternative tools for wrangling with traces, both made by Cisco employees: TranslatorX & Triple Combo.

Also, don't forget to give the tools from Communications Manager Tools Part 1 a go.

Tuesday, 4 December 2012

United Arab Emirates PSTN Route Patterns

I recently had to configure a UC540 for use in the Dubai, unfortunately CCA doesn't have any dial plan templates for the UAE. Below is the route patterns for a simplified UAE dial plan:

Route PatternDescription
00!International calls
971Water or electrical emergencies
997Fire
999Police and emergencies
[2-8]XXXXXXLocal calls
0200XXXXXShared cost services
0300XXXXXReserved for future use
0400XXXXXFree access services
0500XXXXXShared revenue services
0600XXXXXFixed cost services
0700XXXXXShared cost services
0800XXXXXFreephone services
0900XXXXXPremium services
0[234679]XXXXXXXNational area codes
05[0256]XXXXXXXMobiles


Tuesday, 24 July 2012

Communications Manager Tools Part 1

I recently stumbled across a couple of very useful tools for any CUCM deployment. The first uses AXL & JTAPI to remote control Cisco IP phones and the second uses AXL to query the dial plan & report which numbers are in use. Follow the link below for more information:

http://toip-tools.org/en/

Friday, 23 March 2012

Kludging NAT for Communications Manager SIP Trunks

Ideally when using a SIP trunk to an external provider for PSTN connectivity with Communications Manager you'd use a Unified Border Element (UBE) in media flow-through mode to handle SIP to SIP inter-working & present a single IP address for NATing on your Internet router. But what happens when the customer is too cheap to pay for a UBE? Well if the SIP trunk requires registration or the SIP headers formatting in a way the CUCM doesn't like then you're out of luck! Otherwise you can kludge an IOS router into handling the NATing to a single IP address.
The problem stems from the fact that unless you enable "MTP required" Communications Manager handles a SIP trunk like an UBE in media flow-around mode - it handles protocol inter-working but the RTP audio streams pass directly between endpoints. This means that you have to NAT port 5060 to the CUCM server for the SIP traffic, but also NAT the phone's subnet too. Even if you do enable using an MTP, with multiple servers there could be multiple MTPs with different IP addresses.
The configuration below works assuming your IP address for NAT is 1.2.3.4, the CUCM server is 10.1.1.2, the phones reside in the 10.1.1.0/24 network & the SIP trunk is 4.3.2.1:

ip inspect name FIREWALL tcp
ip inspect name FIREWALL udp
ip inspect name FIREWALL sip
!
interface FastEthernet0
 description Outside interface
 ip address 1.2.3.1 255.255.255.248
 ip access-group OUTSIDE_IN in
 ip nat outside
 ip inspect FIREWALL in
 ip inspect FIREWALL out
interface FastEthernet1
 description Inside interface
 ip address 192.168.0.1 255.255.255.0
 ip nat inside
!
ip access-list extended OUTSIDE_IN
 permit tcp host 4.3.2.1 host 1.2.3.4 eq 5060
 permit udp host 4.3.2.1 host 1.2.3.4 eq 5060
 deny   ip any any log
access-list 2 remark Voice subnet
access-list 2 permit 10.1.1.0 0.0.0.255
!
ip nat pool phones 1.2.3.4 1.2.3.4 netmask 255.255.255.252
ip nat inside source list 2 pool phones overload
ip nat inside source static udp 10.1.1.2 5060 1.2.3.4 5060 extendable


This kludge works as we've done a static port NAT to the CUCM server & allowed it in the access-list, this allows call control messages in & out. The SIP inspect punches holes in the access-list to allow the RTP inbound (outbound is allowed anyway). The SIP NAT ALG (application layer gateway) fixes the SIP headers to have the right IP addresses & port numbers. You can confirm this via show ip nat translations which shows the phone's being NATed as well as the CUCM server:

Pro Inside global   Inside local          Outside local   Outside global
udp 1.2.3.4:5060    10.1.1.2:5060         4.3.2.1:5060    4.3.2.1:5060
udp 1.2.3.4:5060    10.1.1.2:5060         ---                   ---
udp 1.2.3.4:32366   10.1.1.21:32366       4.3.2.1:30118   4.3.2.1:30118
udp 1.2.3.4:32367   10.1.1.21:32367       4.3.2.1:30119   4.3.2.1:30119
udp 1.2.3.4:26642   10.1.1.24:26642       4.3.2.1:21068   4.3.2.1:21068
udp 1.2.3.4:26643   10.1.1.24:26643       4.3.2.1:21069   4.3.2.1:21069
udp 1.2.3.4:19462   10.1.1.26:19462       4.3.2.1:31900   4.3.2.1:31900
udp 1.2.3.4:19463   10.1.1.26:19463       4.3.2.1:31901   4.3.2.1:31901
udp 1.2.3.4:29940   10.1.1.26:29940       4.3.2.1:20970   4.3.2.1:20970
udp 1.2.3.4:29941   10.1.1.26:29941       4.3.2.1:20971   4.3.2.1:20971
udp 1.2.3.4:25306   10.1.1.28:25306       4.3.2.1:25398   4.3.2.1:25398
udp 1.2.3.4:25307   10.1.1.28:25307       4.3.2.1:25399   4.3.2.1:25399

Thursday, 24 November 2011

UK PSTN Route Patterns

Using the international dial plan installers from Cisco and the @ symbol for route patterns has two major shortcomings:
  1. You can't easily see what numbers can or can't be dialled
  2. You're at the mercy of Cisco updating it, which can lag a long way behind changes in the dial plan
So whenever I do a Communications Manager installation I manually define the PSTN access route patterns. Ofcom do publish the specifications of the UK Numbering Plan online, below is the route patterns for a simplified version.


Route Pattern Description
00! International dialling
101 Non-emergency police services
111 Non-emergency healthcare services
112 Emergency services
123 Talking clock
999 Emergency services
116XXX Services of social value
118XXX Directory enquiry services
08001111 ChildLine
08454647 NHS Direct
0[12]XXXXXXXXX Geographic area codes
03[0347]XXXXXXXX Nationwide numbers at geographic rates
055XXXXXXXX Corporate numbers
056XXXXXXXX Location independant electronic communications services
070XXXXXXXX Personal numbering service
07[1-9]XXXXXXXX Mobile/pager services
0[58]0XXXXXXX10-digit Freephone
080XXXXXXXX Freephone
082XXXXXXXX Internet for schools
084[3-5]XXXXXXX Special services basic rate
0870XXXXXXX Non-geographic numbers
087[1-3]XXXXXXX Special services higher rate
09XXXXXXXXX Premium rate services

Friday, 28 October 2011

MGCP Control of a Fractional PRI

Using MGCP usually makes life much easier with Communications Manager, but unfortunately it does assume that any PRI circuit is using the full amount of channels (23 for a T1 or 30 for an E1) and therefore doesn't support fractional PRIs.
Here's how to kludge MGCP into using a fractional PRI in 7 easy steps, for this example I'm using an E1 in slot 0/0/0:

1) Configure the gateway as normal in Communications Manager, then on the gateway use the ccm-manager config commands to configure it automatically:
ccm-manager config server x.x.x.x
ccm-manager config

2) Shutdown the voice-port:
voice-port 0/0/0:15
 shutdown
controller E1 0/0/0
 shutdown

3) Remove the ISDN layer 3 binding:
interface Serial 0/0/0:15
 no isdn bind-l3 ccm-manager

4) Replace the pri-group:
controller E1 0/0/0
 no pri-group
 pri-group timeslots 1-x service mgcp

5) Restore the ISDN layer 3 binding:
interface Serial 0/0/0:15
 isdn bind-l3 ccm-manager

6) Enable the voice-port:
controller E1 0/0/0
 no shutdown
voice-port 0/0/0:15
 no shutdown

7) Disable auto-configuration downloading, otherwise Communications Manager may undo your hard work:
no ccm-manager config
copy running-config startup-config

Wednesday, 26 October 2011

Upgrading Old Versions of Communications Manager and Phones

This is a problem you'll encounter when either upgrading an old install of Communications Manager (usually versions prior to 6) or plugging in an old phone that was found in a store cupboard somewhere...


Both SCCP & SIP firmwares for 7900 series phones prior to 8.3.3 can't be directly upgraded to newer versions, it'll usually give an error message along the lines of "auth fail" when the phone tries to download the newer firmware. The solution is to upgrade the phone to 8.5.2, then you can upgrade to any newer firmware. To do this I have a UC540 configured with 8.5.2 firmware loads for most models of phone, then it's just a case of plugging the old phone into the UC540 to do the interim upgrade before connecting it to the live Communications Manager.
You can check a phone's firmware version by going to Settings > Model Information, the version is listed under Load File.