Friday, December 9, 2011

Caller ID Display over ISDN PRI - PART 2

Mapping ISDN Display/Facility IEs to H323/SIP/MGCP Protocols


Mapping to H323 is one-to-one job since both ISDN and H323 are using same functional structure.
-          ISDN Display IE will be sent directly as H323 Display IE
-          ISDN Facility IE will be converted to H323 Display IE (after enabling the required features).

We just mentioned that “since Facility IE isn’t recognized by phone or CUCM” !! Then if CNAM is received over the PRI trunk as facility IE and CNAM as supplementary service isn’t enabled on the gateway, facility IE will be forwarded to CUCM without decoding and CNAM won’t be displayed since Facility IE isn’t recognized by phone or CUCM H323 Trunk

However, two features have been introduced in IOS 12.4(11)XW to fix this problem:

1.       When a Q.931 Setup message with a "name-to-follow" indication is received from an ISDN switch, the gateway can buffer the setup message until the subsequent Q.931 Facility message with calling name information is received. The name information from the Q.931 Facility message is now placed into the H.323 Setup message Display IE and sent to CUCM. If the buffer timer expires before the Q.931 Facility message is received, an H.323 Setup is sent with no name information and, if it subsequently arrives, the information is sent on using an H.323 Notify message.

At the voice service level:

voice service voip
  h323
  h225 timeout ntf <50-5000>
  isdn supp-service name calling

At the voice class level:

voice class h323 1
  h225 timeout ntf <50-5000>
  isdn supp-service name calling


2.       When a Q.931 Setup message with a "name-to-follow" indication is received from an ISDN switch, an H.323 Setup message with no name information is sent to CUCM. When the subsequent Q.931 Facility message is received with calling name information, it is mapped by the gateway to an H.323 Notify Display IE so that CUCM can interpret it correctly and display it on the IP Phone

At the voice service level:

voice service voip
  h323
    h225 display-ie ccm-compatible

At the voice class level:

voice class h323 1
  h225 display-ie ccm-compatible [system]

Now we are clear about mapping display between H323/ISDN in case Display IE is used or Facility IE. What about display map between SIP/ISDN??

The caller ID information is passed through from the ISDN-to-SIP by copying the number in the Calling Party Number IE in an ISDN Setup message into the Calling Number field of the SIP Remote-Party-ID and From headers.

The Calling Name from the ISDN Display IE is copied into the SIP Display Name field in the SIP Remote-Party-ID and From headers.

*Mar  1 12:13:05.084: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:2001@100.100.100.100:5060 SIP/2.0
Date: Fri, 10 Sep 2010 08:51:07 GMT
Call-Info: ;method="NOTIFY;Event=telephone-event;Duration=500"
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
From: ;tag=cae0565b-8d47-419c-8985-9aaae65055d7-19223684
Allow-Events: presence, kpml
P-Asserted-Identity:
Supported: timer,resource-priority,replaces
Min-SE:  1800
Remote-Party-ID: ;party=calling;screen=yes;privacy=off
Content-Length: 0
User-Agent: Cisco-CUCM7.0
To:
Contact:
Expires: 180
Call-ID: 8bc81500-c891f17b-42-832ca8c0@192.168.44.131
Via: SIP/2.0/TCP 192.168.44.131:5060;branch=z9hG4bK5b7d08e5bb
CSeq: 101 INVITE
Session-Expires:  1800
Max-Forwards: 70

The Calling Party Number IE contains a Presentation Indicator (PI) field that is set to presentation allowed, presentation restricted, number not available due to interworking, or reserved. Presentation allowed and presentation restricted are translated into privacy set to off or privacy set to null, respectively, in the SIP Remote-Party-ID header field. This means that SIP is marking that Calling Number IE as private but its not removing it from SIP message. To strip this information from SIP message so that its not sent to the next-hop (instead of marking it as private ONLY),

voice service voip
 clid strip pi-restrict all
!
dial-peer voice dial-peer-number voip
 clid strip pi-restrict all

SIP support display name substitution. When this is enabled, if there is no Display Name field in Display IE but there is a number, it copies the number into the Display Name field, so the number is displayed on the recipient's Call-ID display.

voice service voip
 clid substitute name
!
dial-peer voice dial-peer-number voip
 clid substitute name

The display information can be mapped as well to P-Asserted-Identity Header or P-Prefered-Identity header instead of Remote-ID header. This depends on the implementation of SIP protocol.

Nov 12 00:10:21.615: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:3001@142.6.65.254:5060 SIP/2.0
Via: SIP/2.0/UDP 142.6.64.254:5060;branch=z9hG4bKAB58
From: "5001" ;tag=141484-508
To:
Date: Sat, 12 Nov 2011 00:10:21 GMT
Call-ID: 8B999D14-BF911E1-801EE53F-B7CD48C9@142.6.64.254
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 2341900212-200872417-2149115199-3083684041
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1321056621
Contact:
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
P-Asserted-Identity: "5001"
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 238

v=0
o=CiscoSystemsSIP-GW-UserAgent 6045 3096 IN IP4 142.6.64.254
s=SIP Call
c=IN IP4 142.6.64.254
t=0 0
m=audio 16474 RTP/AVP 18 19
c=IN IP4 142.6.64.254
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:19 CN/8000
a=ptime:20

Typical implementation of PAI and PPI will follow this:

The P-Preferred-Identity header field is used by user agent to proxy to carry the identity the user sending the SIP message wishes to be used for the P-Asserted-Header field value that the trusted element will insert.

The P-Asserted-Identity header field is used to carry the identity of a user sending a SIP message after getting authenticated by SIP Proxy server. Usually SIP Proxy server will replace PPI with PAI.

To enable/disable those three SIP headers:

PAI

voice service voip
 sip
   asserted-id pai
!
or
!
dial-peer voice 1 voip
 voice-class sip asserted-id pai
 session protocol sipv2

Remote-ID

sip-ua
 remote-party-id

PPI

voice service voip
 sip
   asserted-id ppi
!
or
!
dial-peer voice 1 voip
 voice-class sip asserted-id ppi
 session protocol sipv2


What about MGCP gateways ?? How is CNAM display handled ??

On MGCP gateways, CNAM can be displayed using both display IE as well as Facility IE. However, this is controlled from CUCM MGCP Gateway configured. No changes are required on local gateway since Q931 messages are backhauled to CUCM.


‘qsig decode’ feature can’t be used in mgcp gateways and therefore called name can’t be displayed.

Note:
Any changes done on MGCP gateway (such as enabled display IE, enabled facility IE, enabled progress IE, etc) in CUCM requires restart of mgcp service on gateway using ‘no mgcp / mgcp’ commands.

In digital networking (SIP or H323) both called and calling name/number will be displayed on both phones (calling and called). This is the beauty of digital networking compared to analog SIMPLICITY !!

Sunday, November 27, 2011

Caller ID Display over ISDN PRI - PART 1

I thought to divide this topic into two blogs to make it more clear. First we will understand Caller ID Display from ISDN side, then we will map it to call control protocols (MGCP/SIP/H323).


Advanced ISDN IEs Configuration (Facility & Display)


Display IE is used mainly to provide the calling name over PRI Trunk. It can be sent in SETUP, ALERTING, or CALLPROC messages. For example,

Nov 23 12:36:11.610: ISDN Se0/2/0:23 Q931: TX -> SETUP pd = 8  callref = 0x00A3
        Bearer Capability i = 0x8090A2
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA98383
                Exclusive, Channel 3
        Progress Ind i = 0x8183 - Origination address is non-ISDN 
        Display i = 'user01'
        Calling Party Number i = 0x4180, '2023001'
                Plan:ISDN, Type:Subscriber(local)
        Called Party Number i = 0xC1, '3023001'
                Plan:ISDN, Type:Subscriber(local)
Nov 23 12:36:11.642: ISDN Se0/2/0:23 Q931: RX <- CALL_PROC pd = 8  callref = 0x80A3
        Channel ID i = 0xA98383
                Exclusive, Channel 3
Nov 23 12:36:11.694: ISDN Se0/2/0:23 Q931: RX <- ALERTING pd = 8  callref = 0x80A3
        Progress Ind i = 0x8188 - In-band info or appropriate now available

However, Display IE isn’t enabled by default. In order to enable it different methods are available.

1)
interface Serial0/2/0:23
 no ip address
 encapsulation hdlc
 isdn switch-type primary-ni
 isdn incoming-voice voice
 isdn outgoing display-ie
 no cdp enable

2)
interface Serial0/2/0:23
 no ip address
 encapsulation hdlc
 isdn switch-type primary-ni
 isdn incoming-voice voice
 isdn outgoing ie display
 no cdp enable

Also, calling name is considered as supplementary service and therefore it can be carried over Facility IE instead of Display IE. Facility IE is enabled by default on PRI trunk, however, calling name as supplementary service isn’t enabled by default. Facility IE can be carried in SETUP and ALERTING messages.

interface Serial0/2/0:23
 no ip address
 encapsulation hdlc
 isdn switch-type primary-ni
 isdn incoming-voice voice
 isdn supp-service name calling
 no cdp enable
end

Nov 23 12:26:23.558: ISDN Se0/2/0:23 Q931: TX -> SETUP pd = 8  callref = 0x009D
        Bearer Capability i = 0x8090A2
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA98383
                Exclusive, Channel 3
        Facility i = 0x9F8B0100A10E0201080201008006757365723031
                Protocol Profile =  Networking Extensions
                0xA10E0201080201008006757365723031
                Component = Invoke component
                        Invoke Id = 8
                        Operation = CallingName
                                Name Presentation Allowed Extended
                                Name = user01
        Progress Ind i = 0x8183 - Origination address is non-ISDN 
        Calling Party Number i = 0x4180, '2023001'
                Plan:ISDN, Type:Subscriber(local)
        Called Party Number i = 0xC1, '3023001'
                Plan:ISDN, Type:Subscriber(local)
Nov 23 12:26:23.594: ISDN Se0/2/0:23 Q931: RX <- CALL_PROC pd = 8  callref = 0x809D
        Channel ID i = 0xA98383
                Exclusive, Channel 3
Nov 23 12:26:23.642: ISDN Se0/2/0:23 Q931: RX <- ALERTING pd = 8  callref = 0x809D
        Progress Ind i = 0x8188 - In-band info or appropriate now available

The same command should be applied on the terminating gateway in order to decode the Facility IE value as calling name and send the displayed text to the phone (in case of CME) or to CUCM. Else, Facility IE will be forwarded without decode (raw value) and the calling name won’t be displayed since Facility IE isn’t recognized by phone or CUCM (KEEP THIS IN MIND CAUSE WE WILL USE IT IN THE SECOND BLOG).

Notes:
1.       Calling Name (CNAM) as Facility IE and Display IE can be enabled simultenously.
2.       IEs can be enabled/disabled invidually under D-Channel configuration. E.g. “no isdn outgoing ie facility”, “no isdn outgoing ie calling-number”, “no isdn outgoing ie called-number”, etc. This can be used to hide calling number by disabling Calling Number IE. Still CLID feature can be used as well.
3.       Converting the hex value of Facility IE to ASCII, you can see the calling name.

Another hint is that CNAM can be sent as Facility IE without enabling CNAM as supplementary service. How??

IOS Gateways have the option to decode application protocol data units (APDUs) for supplementary services. If this command is not enabled, data units are not interpreted and are tunneled through the router.

voice service voip
qsig decode

Decoding those APDUs by the gateway locally enables it to use their contents. Since those APDUs are representing supplementary services, then those are Facility IEs.

Back to name display, once this feature is enabled on both gateways (mandatory on both gateways), IOS will encode all supplementary services on one side to Facility IE and decode them on the other side. Those supplementary services include CNAM and ALERTING name (display the name of called party on calling phone).

Very Important TIP: This is the only way to display the ALERTING NAME on calling phone. Note that ALERTING NAME is carried in the Facility IE of ALERTING message.

Nov 23 12:13:12.123: ISDN Se0/2/0:23 Q931: TX -> SETUP pd = 8  callref = 0x0095
        Bearer Capability i = 0x8090A2
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA98383
                Exclusive, Channel 3
        Facility i = 0x9FAA068001018201018B0100A10E02012D0201008006757365723031
                Protocol Profile =  Networking Extensions
                0x010182
                0x01018B
                0x0100
                0xA10E02012D0201008006757365723031
                Component = Invoke component
        Progress Ind i = 0x8183 - Origination address is non-ISDN 
        Calling Party Number i = 0x4180, '2023001'
                Plan:ISDN, Type:Subscriber(local)
        Called Party Number i = 0xC1, '3023001'
                Plan:ISDN, Type:Subscriber(local)
Nov 23 12:13:12.159: ISDN Se0/2/0:23 Q931: RX <- CALL_PROC pd = 8  callref = 0x8095
        Channel ID i = 0xA98383
                Exclusive, Channel 3
Nov 23 12:13:12.219: ISDN Se0/2/0:23 Q931: RX <- ALERTING pd = 8  callref = 0x8095
        Facility i = 0x9FAA068001018201018B0100A10E02012A0201018006757365723032
                Protocol Profile =  Networking Extensions
                0x010182
                0x01018B
                0x0100
                0xA10E02012A0201018006757365723032
                Component = Invoke component, Unsupported operation 
        Progress Ind i = 0x8188 - In-band info or appropriate now available

Note: In case CNAM as supplementary service is enabled as well as ‘qsig decode’ feature, ‘qsig decode’ feature will take precedence.
Also note the difference between Facility IE for CNAM as supplementary service and CNAM using ‘qsig decode’ feature. For this reason ‘qsig decode’ should be enabled at both sides in order to decode the Facility IE.

At this stage ISDN part should be clear and we can start the second blog.

DNS Performance Troubleshooting

When you are troubleshooting internet performance, there are different parts of the connection should be verified:   ·         DNS Pe...