03-16-2014 09:03 AM - edited 03-12-2019 10:08 AM
The transport layer play a very vital role in all VoIP solution. Cisco CUCM, voice gateways, IP Phones/end points all rely on the transport layer to succesfully establish communications/sessions with their intended destinations. To understand how this affect SIP and H.323 gateways that we will be discussing in this document, we need to understand the OSI layer.
The OSI layer is a conceptual model that characterizes and standardizes the internal functions of a communication system by partitioning it into abstraction layers. The model groups similar communication functions into one of seven logical layers. A layer serves the layer above it and is served by the layer below it.
The OSI model is also used within Cisco SIP stack. While most of the functionality we see during troubleshooting happens at either the session layer or application layer, the foundation of it is actually done at the transport layer. Events at the transport layer even though not very visible unless we dig deeper is very crucial. The table below shows where each component of the UC solution operates in the OSI model.
Application Presentation Session Transport Network Data Link Physical
| cucm/soft phone |
Codecs | |
SIP/H.323/MGCP | |
RTP/UDP/TCP | |
IP | |
Frame relay, ATM.,Ethernet,HDLC | |
Raw Data | |
From the table we can see that all of our SIP, H323, MGCP gateway signaling occurs at the session layer which means that they are heavily dependent on the transport layer
There are two main types of transport protocol cisco gateways use: TCP or UDP.
This blog will not go into the details of what each protocol is, we will only look at the application with regards to the SIP stack and the H323 stack within CUCM,CUBE and H323 gateway. As most of my blogs/document employ a vey direct and practical approach, I will be using real life logs to explain how this all work.
TCP is connection oriented. Hence nothing happens at the layer above it (session, presentation or application) until a connection is established with the destination peer.
UDP is connectionless, hence it doesn't check for a connection state before blindly progressing to the upper layers.
Before we go ahead lets take a look at the key transaction elements of the TCP protocol.
TCP is a socket oriented protocol and it has different states that it uses to establish communication with each participant in a session. Lets look at the basic connection establishment. TCP uses a three way hand shake to establish a communication between two parties. These three way is defined as follows:
As depicted in the table below, the sending party sends a SYNC, then the receiving party sends a SYNC+ACK and finally the sending sends an ACK to the SYCN of the receiving party. Once this is completed TCP moves to the Establishment state.
A (SYNC)--------------------------------------->B A<--------------------------------------------------B(SYNC + ACK (to the first SYNC)) A--------------------------------------------------->B(ACK(to B's sync)) A(ESTAB)<--------------------------------------->B(ESTAB) |
It is important to understand this states as they are crucial in troubleshooting connection related issues.
To see the TCP transaction on a cisco gateways you can use
debug ip tcp transaction
debug ip tcp packet
Ok lets apply this in a practical way.
Before we look at the example below, it is important to know that before a gateway can send a h225 setup request to CUCM, it must first establish a tcp connection. Without a tcp connection, this will not be possible. Now lets see how this applies.
Table below shows the traces for incoming call to a h323 gateway via ISDN. Trace analysis inset
PSTN-------e1--Gateway----H323----CUCM---sccp--IP Phone
This is an incoming call from 5553620788 to 3259009 returns a busy signal Bearer Capability i = 0x8090A2 Standard = CCITT Transfer Capability = Speech Transfer Mode = Circuit Transfer Rate = 64 kbit/s Channel ID i = 0xA98381 Exclusive, Channel 1 Facility i = 0x9F8B0100A10802015C0201008400 Protocol Profile = Networking Extensions 0xA10802015C0201008400 Component = Invoke component Invoke Id = 92 Operation = CallingName Name not available Calling Party Number i = 0x2183, '5553620788' Plan:ISDN, Type:National Called Party Number i = 0xC1, '3259009' Plan:ISDN, Type:Subscriber(local) Dec 28 15:22:42.870: ISDN Se0/0/0:23 Q931: Received SETUP callref = 0xFE0C callID = 0x000D switch = primary-ni interface = User ####h225 call setup#### Dec 28 15:22:42.870: //-1/42358F99800D/CCAPI/cc_api_display_ie_subfields: cc_api_call_setup_ind_common: cisco-username= ----- ccCallInfo IE subfields ----- cisco-ani=5553620788 cisco-anitype=2 cisco-aniplan=1 cisco-anipi=0 cisco-anisi=3 dest=3259009 cisco-desttype=4 cisco-destplan=1 cisco-rdie=FFFFFFFF cisco-rdn= cisco-rdntype=-1 cisco-rdnplan=-1 cisco-rdnpi=-1 cisco-rdnsi=-1 cisco-redirectreason=-1 fwd_final_type =0 final_redirectNumber = hunt_group_timeout =0 Interface=0x323209CC, Call Info( Calling Number=5553620788,(Calling Name=)(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN), Calling Translated=FALSE, Subscriber Type Str=RegularLine, FinalDestinationFlag=TRUE, Incoming Dial-peer=200, Progress Indication=NULL(0), Calling IE Present=TRUE, Source Trkgrp Route Label=, Target Trkgrp Route Label=, CLID Transparent=FALSE), Call Id=-1 Dec 28 15:22:42.870: //-1/42358F99800D/CCAPI/ccCheckClipClir: In: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:42.870: //-1/42358F99800D/CCAPI/ccCheckClipClir: Out: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:42.870: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.870: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.870: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.870: //315/42358F99800D/CCAPI/cc_api_call_setup_ind_common: Set Up Event Sent; Call Info(Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN)) Dec 28 15:22:42.870: //315/42358F99800D/CCAPI/cc_process_call_setup_ind: Event=0x3213BB30 Dec 28 15:22:42.870: //-1/xxxxxxxxxxxx/CCAPI/cc_setupind_match_search: Try with the demoted called number 3259009 Dec 28 15:22:42.870: //315/42358F99800D/CCAPI/ccCallSetContext: Context=0x32B9F744 Dec 28 15:22:42.870: //315/42358F99800D/CCAPI/cc_process_call_setup_ind: >>>>CCAPI handed cid 315 with tag 200 to app "_ManagedAppProcess_Default" Dec 28 15:22:42.870: //315/42358F99800D/CCAPI/ccCallProceeding: Progress Indication=NULL(0) Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Destination=, Calling IE Present=TRUE, Mode=0, Outgoing Dial-peer=501, Params=0x32BA34E4, Progress Indication=NULL(0) Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccCheckClipClir: In: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccCheckClipClir: Out: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Destination Pattern=3......, Called Number=3259009, Digit Strip=FALSE Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN), Redirect Number=, Display Info= Account Number=, Final Destination Flag=TRUE, Guid=42358F99-5039-11E2-800D-F866F26A4840, Outgoing Dial-peer=501 Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/cc_api_display_ie_subfields: ccCallSetupRequest: cisco-username= ----- ccCallInfo IE subfields ----- cisco-ani=5553620788 cisco-anitype=2 cisco-aniplan=1 cisco-anipi=0 cisco-anisi=3 dest=3259009 cisco-desttype=4 cisco-destplan=1 cisco-rdie=FFFFFFFF cisco-rdn= cisco-rdntype=-1 cisco-rdnplan=-1 cisco-rdnpi=-1 cisco-rdnsi=-1 cisco-redirectreason=-1 fwd_final_type =0 final_redirectNumber = hunt_group_timeout =0 Interface=0x31850F48, Interface Type=1, Destination=, Mode=0x0, Call Params(Calling Number=5553620788,(Calling Name=)(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN), Calling Translated=FALSE, Subscriber Type Str=RegularLine, FinalDestinationFlag=TRUE, Outgoing Dial-peer=501, Call Count On=FALSE, Source Trkgrp Route Label=, Target Trkgrp Route Label=, tg_label_flag=0, Application Call Id=) Dec 28 15:22:42.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:42.874: //316/42358F99800D/CCAPI/ccIFCallSetupRequestPrivate: SPI Call Setup Request Is Success; Interface Type=1, FlowMode=1 Dec 28 15:22:42.874: //316/42358F99800D/CCAPI/ccCallSetContext: Context=0x32BA3494 Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccSaveDialpeerTag: Outgoing Dial-peer=501 Dec 28 15:22:42.874: //316/42358F99800D/CCAPI/ccGetMediaClassTag: media class tag 0 Dec 28 15:22:42.874: //316/42358F99800D/CCAPI/ccSetMediaclassIp2ipTags: media class tags set: NR 0, ASP 0 Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccSetMediaclassIp2ipTags: media class tags set: NR 0, ASP 0 Dec 28 15:22:42.874: //316/42358F99800D/CCAPI/ccGet_xc_nr_asp_info: media class tags: NR 0, ASP 0 Dec 28 15:22:42.874: //315/42358F99800D/CCAPI/ccGet_xc_nr_asp_info: ###voice gateway attempts to setup call to primary cucm (publisher-which was down in this case)### media class tags: NR 0, ASP 0cch323_ip_best_local_address: IP 10.1.100.100 found for bound IDB Loopback0cch323_ip_best_local_address: IP 10.1.100.100 found for bound IDB Loopback0 *********TCP Transaction for the down dial-peer (publisher was down)************* Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_NO_DELAY (0) 3235B6D0 Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_TOS (11) 3235B71C Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_NONBLOCKING_WRITE (10) 3235B730 Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_NONBLOCKING_READ (14) 3235B730 Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_KEEPALIVE (17) 3235B730 Dec 28 15:22:42.874: TCP: Setting Keepalive interval and retries to 60 and 4 Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_VRFTABLEID (20) 329424A0 Dec 28 15:22:42.874: TCB2CEF6C08 setting property TCP_NO_DELAY (0) 3235B71C vr# Dec 28 15:22:42.874: TCP: Random local port generated 41942, network 1 Dec 28 15:22:42.874: TCB2CEF6C08 bound to 10.1.100.100.41942 Dec 28 15:22:42.874: Reserved port 41942 in Transport Port Agent for TCP IP type 1 Dec 28 15:22:42.874: TCP: sending SYN, seq 3207241951, ack 0---------------------Here TCP SYNC was sent to CUCM Dec 28 15:22:42.874: TCP0: Connection to 10.1.1.11:1720, advertising MSS 1460 Dec 28 15:22:42.874: TCP0: state was CLOSED -> SYNSENT [41942 -> 10.1.1.11(1720)]-------client changed from closed stated to sync sent Dec 28 15:22:42.874: ISDN Se0/0/0:23 Q931: TX -> CALL_PROC pd = 8 callref = 0xFE0C Channel ID i = 0xA98381 Exclusive, Channel 1 vr# Dec 28 15:22:44.866: TCP389: ACK timeout timer expired----------------------------------Here We see that TCP timer expired for the SYNC Dec 28 15:22:44.874: 10.1.100.100:41942 <---> 10.1.1.11:1720 congestion window changes Dec 28 15:22:44.874: cwnd from 1460 to 1460, ssthresh from 65535 to 2920 Dec 28 15:22:44.874: TCP0: timeout #1 - timeout is 4000 ms, seq 3207241951----------------Here we see the sequence number (seq 3207241951) corresponds to the SYN sent seq number Dec 28 15:22:44.874: TCP: (41942) -> 10.1.1.11(1720) Dec 28 15:22:45.494: RAS OUTGOING PDU ::= Dec 28 15:22:45.494: RAS OUTGOING ENCODE BUFFER::= 00000542060008914A0004000A016464C9802800B500001240013C05010000 Dec 28 15:22:45.494: Dec 28 15:22:45.874: Released port 41942 in Transport Port Agent for TCP IP type 1 delay 240000-------------TCP port closed because timer expired Dec 28 15:22:45.874: TCP0: state was SYNSENT -> CLOSED [41942 -> 10.1.1.11(1720)]-----client changes state from TCP SYNSENT changed to closed Dec 28 15:22:45.874: TCB 0x2CEF6C08 destroyed---------------TCP connection destroyed Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/cc_api_call_disconnected: Cause Value=38, Interface=0x31850F48, Call Id=316---------------------The CCAPI leg then disconnnects also. Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/cc_api_call_disconnected: Call Entry(Responsed=TRUE, Cause Value=38, Retry Count=0) Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCallReleaseResources: release reserved xcoding resource. Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/ccCallSetAAA_Accounting: Accounting=1, Call Id=316 Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=38, Tag=0x0, Call Entry(Previous Disconnect Cause=0, Disconnect Cause=38) Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=38, Call Entry(Responsed=TRUE, Cause Value=38) Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/cc_api_get_transfer_info: Transfer Number=NULL Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/cc_api_call_disconnect_done: Disposition=0, Interface=0x31850F48, Tag=0x0, Call Id=316, Call Entry(Disconnect Cause=38, Voice Class Cause Code=0, Retry Count=0) Dec 28 15:22:45.874: //316/42358F99800D/CCAPI/cc_api_call_disconnect_done: Call Disconnect Event Sent Dec 28 15:22:45.874: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: Dec 28 15:22:45.874: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: ######Next the Second dial-peer is tried after the first one failed####### Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Destination=, Calling IE Present=TRUE, Mode=0, Outgoing Dial-peer=502, Params=0x32BA2074, Progress Indication=NULL(0)-----------NB that no incoming dial-peer is matched again..its already matched for the first call leg.. Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCheckClipClir: In: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCheckClipClir: Out: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed) Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Destination Pattern=3......, Called Number=3259009, Digit Strip=FALSE Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccCallSetupRequest: Calling Number=5553620788(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN), Redirect Number=, Display Info= Account Number=, Final Destination Flag=TRUE, Guid=42358F99-5039-11E2-800D-F866F26A4840, Outgoing Dial-peer=502 Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/cc_api_display_ie_subfields: ccCallSetupRequest: cisco-username= ----- ccCallInfo IE subfields ----- cisco-ani=5553620788 cisco-anitype=2 cisco-aniplan=1 cisco-anipi=0 cisco-anisi=3 dest=3259009 cisco-desttype=4 cisco-destplan=1 cisco-rdie=FFFFFFFF cisco-rdn= cisco-rdntype=-1 cisco-rdnplan=-1 cisco-rdnpi=-1 cisco-rdnsi=-1 cisco-redirectreason=-1 fwd_final_type =0 final_redirectNumber = hunt_group_timeout =0 Interface=0x31850F48, Interface Type=1, Destination=, Mode=0x0, Call Params(Calling Number=5553620788,(Calling Name=)(TON=National, NPI=ISDN, Screening=Network, Presentation=Allowed), Called Number=3259009(TON=Subscriber, NPI=ISDN), Calling Translated=FALSE, Subscriber Type Str=RegularLine, FinalDestinationFlag=TRUE, Outgoing Dial-peer=502, Call Count On=FALSE, Source Trkgrp Route Label=, Target Trkgrp Route Label=, tg_label_flag=0, Application Call Id=) Dec 28 15:22:45.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:45.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:45.874: //-1/xxxxxxxxxxxx/CCAPI/cc_get_feature_vsa: Dec 28 15:22:45.874: //317/42358F99800D/CCAPI/ccIFCallSetupRequestPrivate: SPI Call Setup Request Is Success; Interface Type=1, FlowMode=1 Dec 28 15:22:45.874: //317/42358F99800D/CCAPI/ccCallSetContext: Context=0x32BA2024 Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccSaveDialpeerTag: Outgoing Dial-peer=502 Dec 28 15:22:45.874: //317/42358F99800D/CCAPI/ccGetMediaClassTag: media class tag 0 Dec 28 15:22:45.874: //317/42358F99800D/CCAPI/ccSetMediaclassIp2ipTags: media class tags set: NR 0, ASP 0 Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccSetMediaclassIp2ipTags: media class tags set: NR 0, ASP 0 Dec 28 15:22:45.874: //317/42358F99800D/CCAPI/ccGet_xc_nr_asp_info: media class tags: NR 0, ASP 0 Dec 28 15:22:45.874: //315/42358F99800D/CCAPI/ccGet_xc_nr_asp_info: media class tags: NR 0, ASP 0cch323_ip_best_local_address: IP 10.1.100.100 found for bound IDB Loopback0cch323_ip_best_local_address: IP 10.1.100.100 found for bound IDB Loopback0 Dec 28 15:22:45.874: TCB32B89814 created-----------A new TCP connection is created for the second dial-peer Dec 28 15:22:45.874: TCB32B89814 setting property TCP_NO_DELAY (0) 3235B6D0 Dec 28 15:22:45.874: TCB32B89814 setting property TCP_TOS (11) 3235B71C Dec 28 15:22:45.874: TCB32B89814 setting property TCP_NONBLOCKING_WRITE (10) 3235B730 Dec 28 15:22:45.874: TCB32B89814 setting property TCP_NONBLOCKING_READ (14) 3235B730 Dec 28 15:22:45.874: TCB32B89814 setting property TCP_KEEPALIVE (17) 3235B730 Dec 28 15:22:45.874: TCP: Setting Keepalive interval and retries to 60 and 4 Dec 28 15:22:45.874: TCB32B89814 setting property TCP_VRFTABLEID (20) 329424A0 Dec 28 15:22:45.874: TCB32B89814 setting property TCP_NO_DELAY (0) 3235B71C Dec 28 15:22:45.874: TCP: Random local port generated 63553, network 1 Dec 28 15:22:45.874: TCB32B89814 bound to 10.1.100.100.63553 Dec 28 15:22:45.874: Reserved port 63553 in Transport Port Agent for TCP IP type 1 Dec 28 15:22:45.874: TCP: sending SYN, seq 3513163156, ack 0---------------TCP SYN was sent to CUCM Subcriver here..NB the Seq number (seq 3513163156) Dec 28 15:22:45.878: TCP0: Connection to 10.1.1.12:1720, advertising MSS 1460---------------TCP connection to 10.1.1.12 Dec 28 15:22:45.878: TCP0: state was CLOSED -> SYNSENT [63553 -> 10.1.1.12(1720)]--------------NB: State changed from CLosed to SYNSENT Dec 28 15:22:45.878: TCP0: state was SYNSENT -> ESTAB [63553 -> 10.1.1.12(1720)]---------------NB: State changed from SYNSENT to ESTABLISHED Dec 28 15:22:45.878: TCP: tcb 32B89814 connection to 10.1.1.12:1720, peer MSS 1460, MSS is 1460cch323_ip_best_local_address: IP 10.1.100.100 found for bound IDB Loopback0---Here TCP connection is established to 10.1.1.12 ***********NEXT we see the CALL PROCEEDING.......and we see H245 capabilities exchange after TCP connection is established**************** Dec 28 15:22:45.878: H245 FS OLC OUTGOING PDU ::= { forwardLogicalChannelNumber 1 forwardLogicalChannelParameters { dataType audioData : g729 : 2 multiplexParameters h2250LogicalChannelParameters : { sessionID 1 mediaControlChannel unicastAddress : iPAddress : { network '0A016464'H tsapIdentifier 16423 } silenceSuppression FALSE } } } Dec 28 15:22:45.878: Dec 28 15:22:45.878: H245 FS OLC OUTGOING PDU ::= { forwardLogicalChannelNumber 1 forwardLogicalChannelParameters { dataType nullData : NULL multiplexParameters none : NULL } reverseLogicalChannelParameters { dataType audioData : g729 : 2 multiplexParameters h2250LogicalChannelParameters : { sessionID 1 mediaChannel unicastAddress : iPAddress : { network '0A016464'H tsapIdentifier 16422 } mediaControlChannel unicastAddress : iPAddress : { network '0A016464'H tsapIdentifier 16423 } silenceSuppression FALSE } } } Dec 28 15:22:45.878: Dec 28 15:22:45.878: H225 NONSTD OUTGOING PDU ::= { version 2 protoParam qsigNonStdInfo : { iei 4 rawMesg '04038090A21803A983811C0E9F8B0100A1080201...'H } } Dec 28 15:22:45.878: Dec 28 15:22:45.878: H225.0 OUTGOING PDU ::= { h323-uu-pdu { h323-message-body setup : { protocolIdentifier { 0 0 8 2250 0 4 } sourceInfo { vendor { vendor { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } } gateway { protocol { voice : { supportedPrefixes { } } } } mc FALSE undefinedNode FALSE } activeMC FALSE conferenceID '42358F99503911E2800DF866F26A4840'H conferenceGoal create : NULL callType pointToPoint : NULL sourceCallSignalAddress ipAddress : { ip '0A016464'H port 63553 } callIdentifier { guid '42358F99503911E2804A903A21A7A74D'H } fastStart { '0000000D4001800B050001000A016464402700'H, '400000060401004D40018012150001000A016464...'H } mediaWaitForConnect FALSE canOverlapSend FALSE multipleCalls TRUE maintainConnection TRUE symmetricOperationRequired NULL } h245Tunneling TRUE nonStandardControl { nonStandardIdentifier h221NonStandard : { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } data '60010200010480EC04038090A21803A983811C0E...'H } } tunnelledSignallingMessage { tunnelledProtocolID { id tunnelledProtocolAlternateID : { protocolType "gtd" } } messageContent { '49414D2C0D0A50524E2C6973646E2A2C2C4E492A...'H } tunnellingRequired NULL } } } Dec 28 15:22:45.882: Dec 28 15:22:46.242: H225.0 INCOMING ENCODE BUFFER::= 2180060008914A000522C0B50000120F436973636F43616C6C4D616E6167657200310110C0110042358F99503911E2804A903A21A7A74D0100010010A00100100140B500001209820400000400010300 Dec 28 15:22:46.242: Dec 28 15:22:46.242: H225.0 INCOMING PDU ::= { h323-uu-pdu { h323-message-body callProceeding : { protocolIdentifier { 0 0 8 2250 0 5 } destinationInfo { vendor { vendor { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } productId '436973636F43616C6C4D616E61676572'H versionId '31'H } terminal { } mc FALSE undefinedNode FALSE } callIdentifier { guid '42358F99503911E2804A903A21A7A74D'H } multipleCalls FALSE maintainConnection FALSE } h245Tunneling FALSE nonStandardControl { nonStandardIdentifier h221NonStandard : { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } data '820400000400010300'H } } } } Dec 28 15:22:46.242: Dec 28 15:22:46.242: H225 NONSTD INCOMING PDU ::= { callMgrParam { interclusterVersion 3 enterpriseID {} } } CallInfo(called ccm detected=TRUE ccmVersion 3) Dec 28 15:22:46.242: //317/42358F99800D/CCAPI/cc_api_call_proceeding: Interface=0x31850F48, Progress Indication=NULL(0) Dec 28 15:22:46.246: H225.0 INCOMING ENCODE BUFFER::= 2580060008914A00051100110042358F99503911E2804A903A21A7A74D10800100 Dec 28 15:22:46.246: Dec 28 15:22:46.246: H225.0 INCOMING PDU ::= { h323-uu-pdu { h323-message-body releaseComplete : { protocolIdentifier { 0 0 8 2250 0 5 } callIdentifier { guid '42358F99503911E2804A903A21A7A74D'H } } h245Tunneling FALSE } } Cause Value=27, Interface=0x31850F48, Call Id=317 Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/cc_api_call_disconnected: Call Entry(Responsed=TRUE, Cause Value=27, Retry Count=0) Dec 28 15:22:46.246: //315/42358F99800D/CCAPI/ccCallReleaseResources: release reserved xcoding resource. Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/ccCallSetAAA_Accounting: Accounting=0, Call Id=317 Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=27, Tag=0x0, Call Entry(Previous Disconnect Cause=0, Disconnect Cause=27) Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=27, Call Entry(Responsed=TRUE, Cause Value=27) Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/cc_api_get_transfer_info: Transfer Number=NULL Dec 28 15:22:46.246: H225.0 OUTGOING PDU ::= { h323-uu-pdu { h323-message-body releaseComplete : { protocolIdentifier { 0 0 8 2250 0 4 } callIdentifier { guid '42358F99503911E2804A903A21A7A74D'H } } h245Tunneling FALSE } } Dec 28 15:22:46.246: Dec 28 15:22:46.246: TCP0: state was ESTAB -> FINWAIT1 [63553 -> 10.1.1.12(1720)] Dec 28 15:22:46.246: TCP0: sending FIN Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/cc_api_call_disconnect_done: Disposition=0, Interface=0x31850F48, Tag=0x0, Call Id=317, Call Entry(Disconnect Cause=27, Voice Class Cause Code=0, Retry Count=0) Dec 28 15:22:46.246: //317/42358F99800D/CCAPI/cc_api_call_disconnect_done: Call Disconnect Event Sent Dec 28 15:22:46.246: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: Dec 28 15:22:46.246: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: Dec 28 15:22:46.250: //315/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=27, Tag=0x0, Call Entry(Previous Disconnect Cause=0, Disconnect Cause=0) Dec 28 15:22:46.250: //315/42358F99800D/CCAPI/ccCallDisconnect: Cause Value=27, Call Entry(Responsed=TRUE, Cause Value=27) Dec 28 15:22:46.250: //315/42358F99800D/CCAPI/cc_api_get_transfer_info: Transfer Number=NULL Dec 28 15:22:46.250: TCP0: state was FINWAIT1 -> FINWAIT2 [63553 -> 10.1.1.12(1720)] Dec 28 15:22:46.250: TCP0: FIN processed Dec 28 15:22:46.250: TCP0: state was FINWAIT2 -> TIMEWAIT [63553 -> 10.1.1.12(1720)] Dec 28 15:22:46.250: ISDN Se0/0/0:23 Q931: TX -> DISCONNECT pd = 8 callref = 0xFE0C Cause i = 0x809B - Destination out of order Dec 28 15:22:47.050: ISDN Se0/0/0:23 Q931: RX <- RELEASE pd = 8 callref = 0x7E0C vr# Dec 28 15:22:47.058: ISDN Se0/0/0:23 Q931: TX -> RELEASE_COMP pd = 8 callref = 0xFE0C Dec 28 15:22:47.062: //315/42358F99800D/CCAPI/cc_api_call_disconnect_done: Disposition=0, Interface=0x323209CC, Tag=0x0, Call Id=315, Call Entry(Disconnect Cause=27, Voice Class Cause Code=0, Retry Count=0) Dec 28 15:22:47.062: //315/42358F99800D/CCAPI/cc_api_call_disconnect_done: Call Disconnect Event Sent Dec 28 15:22:47.062: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: Dec 28 15:22:47.062: //-1/xxxxxxxxxxxx/CCAPI/cc_free_feature_vsa: vr# Dec 28 15:22:47.614: TCP389: ACK timeout timer expired Dec 28 15:22:47.614: TCP389: bad seg from 10.11.200.5 -- outside window: port 22 seq 4156975486 ack 2825658332 rcvnxt 4156975574 rcvwnd 3624 len 88 vr# Dec 28 15:22:50.494: RAS OUTGOING PDU ::= { requestSeqNum 1347 protocolIdentifier { 0 0 8 2250 0 4 } rasAddress ipAddress : { ip '0A016464'H port 51584 } endpointType { vendor { vendor { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } } gateway { protocol { voice : { { } } } } mc FALSE undefinedNode FALSE } } Dec 28 15:22:50.494: vr# Dec 28 15:22:55.493: RAS OUTGOING PDU ::= { requestSeqNum 1347 protocolIdentifier { 0 0 8 2250 0 4 } rasAddress ipAddress : { ip '0A016464'H port 51584 } endpointType { vendor { vendor { t35CountryCode 181 t35Extension 0 manufacturerCode 18 } } gateway { protocol { voice : { { } } } } mc FALSE undefinedNode FALSE } } Dec 28 15:22:55.493:
|
How does this apply to SIP then? good question..
For any sip signaling to occur, INVITE etc, your transport layer needs to be active. Without an active TCP or UDP connection, no sip messagin packets can be delivered to its intended destination. This is very crucial to know when troubleshooting complex sip related issues.
To see the transaction at the transport layer, you will need to use "debug ccsip all on the CUBE" be careful with this as this can potentially make your gateway unstable. Ensure this is done when there is minimal traffic on the CUBE
SIP over TCP, trace analysis
ITSP---SIP--CUBE---SIP---CUCM--SCCP--IP phone |
+++We get an INVITE from ITSP to CUBE++++ This was over UDP..I have skipped that bit, we will come to it later
Received:
+++Next we see what CUBE does before it sends this INVITE out to CUCM (172.16.40.104). CUBE goes into its transport stack to create a TCP connection to the cucm.++++
+++CUBE chooses who the target_host and the outbound_host is. If there is no outbound_host, then a target host is used++++ 6048941: Feb 17 23:38:43.882: //13207949/000000000000/SIP/Info/ccsip_call_setup_request: After processing SETUP REQccb->pld.flags_ipip = 400000
6055494: Feb 17 23:50:48.868: //13207995/291F11629FB7/SIP/Transport/sipSPISendInvite: Sending Invite to the transport layer
++++++Next we see what CUBE does before it sends this INVITE out to CUCM (172.16.40.104)+++++ +++CUBE chooses who the target_host and the outbound_host is. If there is no outbound_host, then a target host is used++++ 6055335: Feb 17 23:50:48.868: //13207995/000000000000/SIP/Info/ccsip_call_setup_request: After processing SETUP REQccb->pld.flags_ipip = 400000
6055499: Feb 17 23:50:48.868: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostRequestConnection: Posting TCP conn create request for addr=172.16.40.104, port=5060, context=0x20DFE258
+++Next CUBE sends a trying to ITSP+++
Sent:
++++Next after 500msec (the tcp timer expires and CUBE didnt get a response back from the CUCM, it tore down the TCP instance and immediately disconnected the call without even sending the INVITE to cucm++++
6055579: Feb 17 23:50:53.685: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIHandleServerTCBTimerPop: Die timer Popped on TCB(0x1FDBF160) |
NB: With TCP, the retry timers and the retry INVITE configured on CUBE/CUCM do not have any impact. SIP over TCP relies on the tcp connect timer.
I believe you can adjust the tcp timer with the command below: The default is 500ms
voice service voip
sip-ua
timers connect 150
Now lets consider UDP
SIP over UDP, trace analysis
ITSP---SIP--CUBE---SIP---CUCM--SCCP--IP phone |
+++INVITE received from ITSP+++++ Received:
++++++Next we see what CUBE does before it sends this INVITE out to CUCM (172.16.40.104)+++++
+++CUBE chooses who the target_host and the outbound_host is. If there is no outbound_host, then a target host is used++++
6048941: Feb 17 23:38:43.882: //13207949/000000000000/SIP/Info/ccsip_call_setup_request: After processing SETUP REQccb->pld.flags_ipip = 400000
+++Next CUBE goes into its transport stack to create a UDP connection to the target host.++++ ++In reality there is no connection before the messages are sent through+++
6049144: Feb 17 23:38:44.384: //13207949/78FF09239F64/SIP/Transport/sipSPISendInvite: Sending Invite to the transport layer
6049150: Feb 17 23:38:44.384: //13207949/78FF09239F64/SIP/Transport/sipTransportLogicSendMsg: Set to send the msg=0x2D8643FC ++++Next we see CUBE sending the INVITE out immediately, this confirms that it doesnt wait for any connection establishment as TCP does+++ 6049152: Feb 17 23:38:44.384: //13207949/78FF09239F64/SIP/Msg/ccsipDisplayMsg:
Sent:
+++Exactly 1sec after the first INVITE was sent, CUBE sends another INVITE because it didnt get a response to the first one++++
6049164: Feb 17 23:38:45.384: //13207949/78FF09239F64/SIP/Msg/ccsipDisplayMsg: Sent:
+++Exactly 2 secs after the last INVITE CUBE sends an out of retreis message and disconnected the call+++
6049165: Feb 17 23:38:47.385: //13207949/78FF09239F64/SIP/Error/act_sentinvite_wait_100: Out of retries |
The sip timers configured on the CUBE impacted how many retries was sent and the time in between retries. The config on this cube was this
sip-ua
retry invite 2
This meant that the default timers retrying time of 500ms was used. That's not a good idea, you should always change your timers from the default..This is a good one to use..
sip-ua
retry invite 2
timers trying 150
It is important to note that with OPTIONS ping configured this behaviour will be different. CUBE/CUCM marks a dial-peer down when it doesn't receive a response to the OPTIONS ping sent to the target host....
MUSINGS:
The transport layer play an important role in any UC solution. Whether you are using H323, SIP or MGCP you need to understand what happens at the transport layer for you to be able to manage, troubleshoot effectively.
Thanks for sharing the detailed blog.
regds,
aman
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: