Sunday, 7 October 2012

Inserting Question Marks

The situations where you'd need to insert a question mark into the CLI are pretty rare, unless working with voice functionality as in regular expressions it means zero or one instance of preceding pattern (i.e. optional). For example when trying to make a dial-peer that matches 10 or 11 digits:

dial-peer voice 16 pots
 description Freephone 10/11 digits
 destination-pattern 080........?
 port 0/0:15


To insert a question mark, simply press Ctrl + V prior to inputting the ?. This acts as an escape sequence & prevents the context sensitive command line help from appearing instead.

Wednesday, 3 October 2012

ISDN Circuit Simulator

With a bit of ingenuity & an T1/E1 crossover cable it's possible to build your own ISDN PRI circuit simulator using spare parts. For this you'll need:
  1. T1/E1 crossover cable (pinouts here)
  2. 2x ISDN VIC/VWIC cards
  3. Enough PVDMs to handle the ISDN card
  4. Cisco routers with appropriate feature set
Using the isdn protocol-emulate command, one ISDN card is set to act as the network side & the other the user side. They're then cabled together using the crossover cable & suitable dial-peers configured to allow calls.
My test rig was a 3845 equipped with a PVDM2-64 & 2x VWIC-1MFT-E1, using my nifty Universal Network Cable for crossover. Config snippets below:

isdn switch-type primary-net5
!       
controller E1 0/0/0
 clock source internal
 pri-group timeslots 1-31
 description Network E1
!
controller E1 0/1/0
 pri-group timeslots 1-31
 description User E1
!
interface Serial0/0/0:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn protocol-emulate network
 isdn incoming-voice voice
 no cdp enable
!
interface Serial0/1/0:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn incoming-voice voice
 isdn negotiate-bchan
 no cdp enable
!
voice-port 0/0/0:15
 cptone GB
 bearer-cap Speech
!
voice-port 0/1/0:15
 cptone GB
 bearer-cap Speech
!
dial-peer voice 1 pots
 incoming called-number .%
 direct-inward-dial
 port 0/0/0:15
!
dial-peer voice 2 pots
 destination-pattern .T
 incoming called-number .%
 direct-inward-dial
 port 0/1/0:15



Using some test IP phones to place calls, you can see from the debug isdn q931 output that the call exits Se0/1/0 & enters Se0/0/0:

*Oct  3 14:37:22.591: ISDN Se0/1/0:15 Q931: Applying typeplan for sw-type 0x12 is 0x0 0x1, Calling num 200
*Oct  3 14:37:22.591: ISDN Se0/1/0:15 Q931: Applying typeplan for sw-type 0x12 is 0x0 0x1, Called num 123
*Oct  3 14:37:22.591: ISDN Se0/1/0:15 Q931: TX -> SETUP pd = 8  callref = 0x0136
        Bearer Capability i = 0x8090A3
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA1839F
                Preferred, Channel 31
        Progress Ind i = 0x8183 - Origination address is non-ISDN 
        Calling Party Number i = 0x0180, '200'
                Plan:ISDN, Type:Unknown
        Called Party Number i = 0x81, '123'
                Plan:ISDN, Type:Unknown
*Oct  3 14:37:22.599: ISDN Se0/0/0:15 Q931: RX <- SETUP pd = 8  callref = 0x0136
        Bearer Capability i = 0x8090A3
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA1839F
                Preferred, Channel 31
        Progress Ind i = 0x8183 - Origination address is non-ISDN 
        Calling Party Number i = 0x0180, '200'
                Plan:ISDN, Type:Unknown
        Called Party Number i = 0x81, '123'
                Plan:ISDN, Type:Unknown
*Oct  3 14:37:22.603: ISDN Se0/0/0:15 Q931: TX -> CALL_PROC pd = 8  callref = 0x8136
        Channel ID i = 0xA9839F
                Exclusive, Channel 31
*Oct  3 14:37:22.607: ISDN Se0/0/0:15 Q931: TX -> ALERTING pd = 8  callref = 0x8136
        Progress Ind i = 0x8188 - In-band info or appropriate now available
*Oct  3 14:37:22.607: ISDN Se0/1/0:15 Q931: RX <- CALL_PROC pd = 8  callref = 0x8136
        Channel ID i = 0xA9839F
                Exclusive, Channel 31
*Oct  3 14:37:22.611: ISDN Se0/1/0:15 Q931: RX <- ALERTING pd = 8  callref = 0x8136
        Progress Ind i = 0x8188 - In-band info or appropriate now available
*Oct  3 14:37:27.759: %ISDN-6-CONNECT: Interface Serial0/0/0:30 is now connected to 200 N/A
*Oct  3 14:37:27.759: ISDN Se0/0/0:15 Q931: TX -> CONNECT pd = 8  callref = 0x8136
*Oct  3 14:37:27.763: ISDN Se0/1/0:15 Q931: RX <- CONNECT pd = 8  callref = 0x8136
*Oct  3 14:37:27.763: %ISDN-6-CONNECT: Interface Serial0/1/0:30 is now connected to 123 N/A
*Oct  3 14:37:27.763: ISDN Se0/1/0:15 Q931: TX -> CONNECT_ACK pd = 8  callref = 0x0136
*Oct  3 14:37:27.767: ISDN Se0/0/0:15 Q931: RX <- CONNECT_ACK pd = 8  callref = 0x0136
*Oct  3 14:37:33.759: %ISDN-6-CONNECT: Interface Serial0/0/0:30 is now connected to 200 N/A
*Oct  3 14:37:33.763: %ISDN-6-CONNECT: Interface Serial0/1/0:30 is now connected to 123 N/A
*Oct  3 14:37:34.567: %ISDN-6-DISCONNECT: Interface Serial0/0/0:30  disconnected from 200 , call lasted 6 seconds
*Oct  3 14:37:34.567: ISDN Se0/0/0:15 Q931: TX -> DISCONNECT pd = 8  callref = 0x8136
        Cause i = 0x8290 - Normal call clearing
*Oct  3 14:37:34.571: ISDN Se0/1/0:15 Q931: RX <- DISCONNECT pd = 8  callref = 0x8136
        Cause i = 0x8290 - Normal call clearing
*Oct  3 14:37:34.571: %ISDN-6-DISCONNECT: Interface Serial0/1/0:30  disconnected from 123 , call lasted 6 seconds
*Oct  3 14:37:34.571: ISDN Se0/1/0:15 Q931: TX -> RELEASE pd = 8  callref = 0x0136
*Oct  3 14:37:34.575: ISDN Se0/0/0:15 Q931: RX <- RELEASE pd = 8  callref = 0x0136
*Oct  3 14:37:34.579: ISDN Se0/0/0:15 Q931: TX -> RELEASE_COMP pd = 8  callref = 0x8136
*Oct  3 14:37:34.583: ISDN Se0/1/0:15 Q931: RX <- RELEASE_COMP pd = 8  callref = 0x8136


For a proper ISDN PRI simulator you'd want to implement a complete inbound dial plan with call routing to some IP phones or analogue phones connected to FXS ports to handle test calls. Then it'll be possible to have a proper Unified Communications lab with simulated PSTN connections.

Friday, 21 September 2012

Training Materials

I've been working my way through the CCIE Voice Blended Learning Self-Study Solution from IPExpert that work bought me. It's definitely worth a look if you want to learn more about Cisco Unified Communications, it covers loads of stuff that's not in the CCNP Voice textbooks from Cisco Press.

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/

Monday, 9 July 2012

MGCP PSTN and QSIG Gateway

Whilst it's becoming ever less common, sometimes there's a need to integrate with legacy equipment, such as PBXs & voice mail systems via a QSIG trunk. Given that a QSIG trunk requires an ISDN interface on a router with PVDMs, it's logical to stick an extra interface into your PSTN gateway & cable it to the legacy device.
Problem is that with MGCP you've now got 2 endpoints with the same IP address, which causes problems with the audio streams. If you enable debug isdn q931 you'll see calls come in a voice port & exit the other, yet there's no audio between the callers. Fortunately the solution is easy - in the CallManager service parameters enable path replacement & tweak the minimum/maximum delay timers:

Wednesday, 20 June 2012

Cisco ESXi Licences

As Cisco is pushing virtualisation with their Unified Communications applications & UCS servers, you'll come across Cisco licence certificates for VMware ESXi licences.
It used to be that you went to the VMware OEM portal for Cisco for Cisco to redeem the licence keys to get the actual ESXi licence. For this you'll need an account on the VMware website to able to log in & redeem the licences, which you then enter into vSphere.
Now Cisco have started shipping actual licence keys for ESXi, but only for certain part codes:
  • VMW-VS-HYP
  • R-VMW-UC-FND
  • R-VMW-UC-FND5-K9
To redeem these you enter the key directly into vSphere.

Wednesday, 13 June 2012

Lightweight AP Controller Discovery

Cisco's lightweight Access Points (AP) support discovering the Wireless LAN Controller (WLC) management IP address via several methods, including:

DNS Resolution
The AP tries to resolve CISCO-LWAPP-CONTROLLER or CISCO-CAPWAP-CONTROLLER using the DNS server configured by DHCP. However you may not have DNS A records for these, especially in small deployments with no DNS server onsite.

DHCP Option 43
The AP uses IP addresses provisioned via DHCP option 43. This consists of a hexadecimal string starting with F1, the number of WLCs multiplied by 4 & the IP addresses of these WLCs in hex. For example one WLC with IP address 10.35.128.5:

1 x 4 = 04 (must be padded to 2 hex digits if less)
10.35.128.5 = 0A238005  (must be padded to 8 hex digits if less)
Resultant hex: F1040A238005

Adding a 2nd WLC with IP address 10.35.128.6 would result in F1080A2380050A238006.

Broadcasts
If the WLC is in the same broadcast domain & has Master Controller Mode enabled the AP can discover it by sending out broadcasts. This won't work in large deployments where APs are spread across multiple networks & is considered bad practice.

Over The Air Provisioning
The AP listens to Radio Resource Management (RRM) messages transmitted by neighbouring APs & learns the WLC IP address from these. However this is considered insecure & usually disabled.

Priming
You can connect a console cable to the AP & manually configure with the WLC's IP address using the lwapp ap controller ip address command. This only works on APs that haven't yet associated with a WLC, but is useful if you have an AP that's refusing to associate via the other methods.