CUBE: leg_disconnect leg_incoming = 500 Internal Server Error

Version 1
    This document was generated from CDN thread

    Created by: Travis May on 21-09-2010 05:00:57 AM
    5350xm
    c5350-jk9su2_ivs-mz.151-2.T1.bin
     
    CUBE
     
    Issuing any of the following results in "500 Internal Server Error" instead of "BYE".  This behavior occurs regardless of CONNECT status.
        leg_disconnect leg_incoming
        leg_disconnect leg_incoming 10
        leg_disconnect leg_incoming 16
     
    "500 Internal Server Error" is undesirable becuase it is inaccurate and the originating gateway does not terminate the PSTN leg upon receipt of the 500.
     
    Issuing the following results in "480 Temporarily unavailable", which simply proves the IOS is receiving the TCL command properly.
        leg_disconnect leg_incoming 18
     
    ****  TCL CODE  ****
     
    proc proc_setup_indication { } {
        leg proceeding leg_incoming
        leg alert leg_incoming -p 8
        timer start named_timer 5 legDisconnect   
    }

    proc proc_named_timer { } {
        leg disconnect leg_incoming
    }

    proc proc_disconnect_done { } {
        call close
    }

    proc fnEventHandler { } {
        puts "\n************* LEGIN EVENT: [infotag get evt_event] ********\n"
        switch [infotag get evt_event] {
            "ev_setup_indication" { proc_setup_indication }
            "ev_named_timer" { proc_named_timer }
            "ev_disconnect_done" { proc_disconnect_done }
        }
    }

    requiredversion 2.1

    set fsm(any_state,ev_any_event) "fnEventHandler,same_state"
    fsm define fsm SINGLESTATE
     
     
    ********  TRACE  RESULT *********
    Sep 21 05:20:44.090: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Received:
    INVITE sip:8669218890@216.52.221.142:5060 SIP/2.0
    Via: SIP/2.0/UDP  216.52.221.144:5060;x-route-tag="cid:TCAST@216.52.221.144";branch=z9hG4bK5A1BAB2
    From: <sip:2132864199@216.52.221.144>;tag=20F39ED4-2351
    To: <sip:8669218890@216.52.221.142>
    Date: Tue, 21 Sep 2010 05:20:44 GMT
    Call-ID: D1498CDD-C47611DF-B36DA9D5-9DFC0F8@216.52.221.144
    Supported: timer,replaces
    Min-SE:  1800
    Cisco-Guid: 3510938373-3296072159-3076063253-3332332504
    User-Agent: Cisco-SIPGateway/IOS-12.x
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
    CSeq: 101 INVITE
    Max-Forwards: 70
    Remote-Party-ID: <sip:2132864199@216.52.221.144>;party=calling;screen=yes;privacy=off
    Timestamp: 1285046444
    Contact: <sip:2132864199@216.52.221.144:5060>
    Expires: 180
    Allow-Events: telephone-event
    Content-Type: application/sdp
    Content-Length: 288

    v=0
    o=CiscoSystemsSIP-GW-UserAgent 1637 1343 IN IP4 216.52.221.144
    s=SIP Call
    c=IN IP4 216.52.221.144
    t=0 0
    m=audio 19986 RTP/AVP 0 18 101
    c=IN IP4 216.52.221.144
    a=rtpmap:0 PCMU/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16

    Sep 21 05:20:44.094: //177789/D144AB05B759/SIP/Msg/ccsipDisplayMsg:
    Sent:
    SIP/2.0 100 Trying
    Via: SIP/2.0/UDP  216.52.221.144:5060;x-route-tag="cid:TCAST@216.52.221.144";branch=z9hG4bK5A1BAB2
    From: <sip:2132864199@216.52.221.144>;tag=20F39ED4-2351
    To: <sip:8669218890@216.52.221.142>
    Date: Tue, 21 Sep 2010 05:20:44 GMT
    Call-ID: D1498CDD-C47611DF-B36DA9D5-9DFC0F8@216.52.221.144
    Timestamp: 1285046444
    CSeq: 101 INVITE
    Allow-Events: telephone-event
    Server: Cisco-SIPGateway/IOS-12.x
    Content-Length: 0


    Sep 21 05:20:44.094: //177789//TCL :/tcl_PutsObjCmd:
    ************* LEGIN EVENT: ev_setup_indication ********

    Sep 21 05:20:44.094:
    Sep 21 05:20:44.098: //177789/D144AB05B759/SIP/Msg/ccsipDisplayMsg:
    Sent:
    SIP/2.0 183 Session Progress
    Via: SIP/2.0/UDP  216.52.221.144:5060;x-route-tag="cid:TCAST@216.52.221.144";branch=z9hG4bK5A1BAB2
    From: <sip:2132864199@216.52.221.144>;tag=20F39ED4-2351
    To: <sip:8669218890@216.52.221.142>;tag=423E8B2C-239
    Date: Tue, 21 Sep 2010 05:20:44 GMT
    Call-ID: D1498CDD-C47611DF-B36DA9D5-9DFC0F8@216.52.221.144
    Timestamp: 1285046444
    CSeq: 101 INVITE
    Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
    Allow-Events: telephone-event
    Contact: <sip:216.52.221.142:5060>
    Supported: sdp-anat
    Server: Cisco-SIPGateway/IOS-12.x
    Content-Type: application/sdp
    Content-Disposition: session;handling=required
    Content-Length: 237

    v=0
    o=CiscoSystemsSIP-GW-UserAgent 0 159 IN IP4 216.52.221.142
    s=SIP Call
    c=IN IP4 216.52.221.142
    t=0 0
    m=audio 24566 RTP/AVP 0 101
    c=IN IP4 216.52.221.142
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16

    Sep 21 05:20:49.094: //177789//TCL :/tcl_PutsObjCmd:
    ************* LEGIN EVENT: ev_named_timer ********

    Sep 21 05:20:49.094:
    Sep 21 05:20:49.094: //177789/D144AB05B759/SIP/Msg/ccsipDisplayMsg:
    Sent:
    SIP/2.0 500 Internal Server Error
    Via: SIP/2.0/UDP  216.52.221.144:5060;x-route-tag="cid:TCAST@216.52.221.144";branch=z9hG4bK5A1BAB2
    From: <sip:2132864199@216.52.221.144>;tag=20F39ED4-2351
    To: <sip:8669218890@216.52.221.142>;tag=423E8B2C-239
    Date: Tue, 21 Sep 2010 05:20:44 GMT
    Call-ID: D1498CDD-C47611DF-B36DA9D5-9DFC0F8@216.52.221.144
    Timestamp: 1285046444
    CSeq: 101 INVITE
    Allow-Events: telephone-event
    Server: Cisco-SIPGateway/IOS-12.x
    Reason: Q.850;cause=16
    Content-Length: 0


    Sep 21 05:20:49.098: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
    Received:
    ACK sip:8669218890@216.52.221.142:5060 SIP/2.0
    Via: SIP/2.0/UDP  216.52.221.144:5060;x-route-tag="cid:TCAST@216.52.221.144";branch=z9hG4bK5A1BAB2
    From: <sip:2132864199@216.52.221.144>;tag=20F39ED4-2351
    To: <sip:8669218890@216.52.221.142>;tag=423E8B2C-239
    Date: Tue, 21 Sep 2010 05:20:44 GMT
    Call-ID: D1498CDD-C47611DF-B36DA9D5-9DFC0F8@216.52.221.144
    Max-Forwards: 70
    CSeq: 101 ACK
    Content-Length: 0


    Sep 21 05:20:49.098: //177789//TCL :/tcl_PutsObjCmd:
    ************* LEGIN EVENT: ev_disconnect_done ********

    Sep 21 05:20:49.098:

    Subject: RE: CUBE: leg_disconnect leg_incoming = 500 Internal Server Error
    Replied by: Travis May on 21-09-2010 06:10:26 AM
    the _ was simply a typo in my description of the problem, not in the code (as you can see if you read the code provided). 
     
    Can you please address the real problem?
     
    Thanks,
    Travis

    Subject: RE: CUBE: leg_disconnect leg_incoming = 500 Internal Server Error
    Replied by: Anusha Kannappan on 21-09-2010 05:26:01 AM
    Hi Travis,
     
    If you are trying to use
    'leg disconnect': The leg disconnect command disconnects one or more call legs that are not part of any connection.
    Please remove the '_' from the command. It is just 'leg disconnect leg_incoming' and not 'leg_disconnect leg_incoming'.
     
    The Syntax is as following
    leg disconnect {legID | info-tag} [-c cause_code] [-g <gtd_handle>] [-i <iec>]
     
    Thanks,
    Anusha

    Subject: RE: CUBE: leg_disconnect leg_incoming = 500 Internal Server Error
    Replied by: Anusha Kannappan on 21-09-2010 02:53:49 PM
    Hi Travis,
     
    I apologise for missing out the code provided by you. We were able to recreate the problem. Right now we are analysing on this issue. Once we get the solution for this we will let you know. 
     
    Thanks,
    Anusha

    Subject: RE: CUBE: leg_disconnect leg_incoming = 500 Internal Server Error
    Replied by: Yaw-Ming Chen on 21-09-2010 05:33:32 PM
    I think the cause most likely is that we are disconnecting a leg that never been connected.
     
    Please try to add "leg connect leg_incoming"
    Also when sending "leg alert" we need to do it in right state.
     
    Thanks !