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


Friday, 2 November 2012

QuesCom GSM Gateways

I've just completed my 2nd deployment of a QuesCom GSM gateway & they're painful to use, so here's a couple of tips for those of you with the misfortune to also have to deal with one these.

Firmware Updates
To update the firmware you'll need:
  • A USB to serial adapter
  • An Ethernet cable
  • TFTPD
  • PuTTY
  • QuesCom firmware (getting this requires a support contract with QuesCom)
Now for the process:
  1. Connect your PC's NIC to the QuesCom using the Ethernet cable, then using the serial cable that came with the QuesCom, connect to the console port on the QuesCom (this is the bottom serial port).
  2. Run TFTPD, configure the DHCP server function on it & also enable PXE compatibility (otherwise you'll get errors), now restart TFTPD for the changes to take effect.
  3. Run PuTTY & connect to the serial port using 19200bps, 8 data bits, no parity, 1 stop bit & no flow control.
  4. Power on the QuesCom & interrupt booting by pressing CTRL + E, then type OK when it says to.
  5. Select 1, wait for it to get a DHCP lease. Alternatively you can manually configure an IP address if DHCP fails.
  6. Input the IP address of your PC running TFTPD, default gateway & file name of the firmware (this is case sensitive).
  7. Wait for the firmware to finish downloading, then select 0 to boot with the new firmware.

Caller ID
The QuesCom GSM gateways default to restricting the caller ID on all outbound calls, regardless of what caller ID you present via H323 or SIP. This is undesirable as many people won't answer the phone to withheld numbers. Unfortunately you can't disable this behaviour from the web based GUI, you have to Telnet to the QuesCom and enter the following commands:
  1. config
  2. root gateway
  3. cd isdn
  4. cd Adapter.x (x=0,1 or 2; if you only have GSM cards in the slots, use 0)
  5. set HideIdentification=0;0;0;0; (this assumes you have 4 SIM card model)
  6. exit
Don't forget to save & reboot, otherwise the changes won't take effect.

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: