TCL-IVR protoHeaders not working for call-thru calls

Version 1
    This document was generated from CDN thread

    Created by: Ian Donaldson on 21-11-2013 08:23:36 PM
    The ability to set arbitrary SIP headers in TCL apps is not working on calls that enter and exit the gateway
    (ie: A-leg is inbound, B-leg outbound; call thru case)

    However it does work if both legs are outbound (eg: call-back case)

    I raised this as a TAC case but they sent me here.

    The example code in Appendix A of the tclivr 2.0 document doesn't work for the call-thru case.

    Adding debug code to this sample code shows the headers are being provided
    to the leg setup command but SIP debugging shows none are added to he actual INVITE sent out.

         leg setup $dest callinfo leg_incoming

    is in the example,  which is for the call-thru case.

    However if you remove the leg_incoming from this statement,
    the B-leg is created with all the correctly supplied protoHeaders
    but this not call-thru and not the case I want to solve.

    Tried various 12.4, 15.1 IOS's on 28xx, 38xx, 39xx platforms.

    Is there some config option that needs to be enabled to fix this or is it just an issue in the SIP stack?

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Geevarghese Cheria on 22-11-2013 01:37:01 AM
    Hi Ian,
       Can you please check that you have given the command
       sip
       header-passing
      under voice service voip
    Thanks and Regards,
    Geevarghese

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Ian Donaldson on 22-11-2013 07:25:09 PM
    Yes header-passing is there.

    As mentioned, in the callback case (A and B legs both outbound) it works fine.  Its only not working
    for the A inbound connected to B outbound case.

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Yaw-Ming Chen on 22-11-2013 08:07:04 PM
    It should work. What IOS version are you using there is a period of time (a wilhe ago, I had touble with certain version)  but I used it recently, didn't norice thete is ant problem.
    Is a standrad header or unsupported header  ? mean sthat we need:
    voice service voip
      sip
        pass-thru headers unsupp
    !


    example:

         set fromheader [infotag get leg_proto_headers From]
          puts ">>> fromheader: $fromheader <<<"
        
         set headers(From) "nobody"$fromheader
          set headers(X-ReferenceNumber) "1234567890"
          set headers(From) "Yawming <sip:1009@172.19.156.107>;tag=D0AC0244-1C19"
          set callinfo(protoHeaders) headers

          leg setup $dest callinfo leg_incoming
          fsm setstate PLACECALL

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Ian Donaldson on 24-11-2013 05:30:06 PM
    Adding    pass-thru headers unsupp   makes no difference 

    The headers I'm trying to set are P-Asserted-Identity and Privacy, which are standard headers.
    However on testing with arbitrary headers its no better (eg: X-Random-Thing)

    Tried sip-hdr-passthrulist method also; but it doesn't allow P-Asserted-Identity or Privacy.  It does allow X-Random-Thing, but
    that still doesn't get to the INVITE.

    I know about 'asserted-id pai' option which partly solves the P-Asserted-Identity need, but not for 
    other special headers.

    It looks ot me that something is just blocking the TCL's setting of headers for pass-thru calls.

    My code works fine In the call-back case (for both the A-leg and for the B-leg)

     ie: leg setup $dest callinfo 

    but not the call thru case (for the B-leg)

     ie: leg setup $dest callinfo leg_incoming

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Ian Donaldson on 24-11-2013 05:52:15 PM
    I should clarify... the call-back case is more complicated, and consists of these key elements:

    set a_setupSignal(X-Random-Thing) "test123"
    set a_setupSignal(Privacy) "id"
    set a_callinfo(protoHeaders) a_setupSignal
    leg setup $a_dest a_callinfo

    set evtlegs [ infotag get evt_legs ]
    set incomingLeg [infotag get leg_incoming]
    foreach oleg [ split $evtlegs " " ] {
        if { $oleg != "" && $oleg != $incomingLeg } {
            set i $oleg
            break
        }
    }  
    set incomingLeg $i

    set b_setupSignal(X-Random-Thing2) "test345"
    set b_callinfo(protoHeaders) b_setupSignal

    leg setup $b_dest b_callinfo $incomingLeg

    And this works for both A and B legs.  X-RandomThing ends up in the A-leg INVITE, and X-Random-Thing2 ends up in the B-leg INVITE.
    All good.

    Its the call-thru case that doesn't work:

    leg setup $b_dest b_callinfo leg_incoming

    I'm using IOS 15.1(4)M7 on 2801, 2825, 3825, 3945's

    Subject: RE: TCL-IVR protoHeaders not working for call-thru calls
    Replied by: Geevarghese Cheria on 24-11-2013 11:09:05 PM
    Hi Ian,
       
          Please send us the logs by enabling below devug
          debug ccsip messages

    Thanks and Regards,
    Geevarghese