Hello,
I have TCL code which does db query and add the retrieved data to custom sip header.
However we have found that during leg setup header gets truncated, i.e we do not get full data in header.
As far as I am aware max length of header is 256 characters. So I am expecting that if value exceeds 256 characters then tcl should truncate at 256, but it truncates value at 184.
****Code: *****
puts "INFO: ***** In UpdateSIPHeaders: CustomHeader - $customheader"
# Custom SIP Header CH set to Call Data From DB
set headers(CH) $customheader
set callinfo(protoHeaders) headers
# Set DN to DN From the DB And update the Call Leg
set dest $KVPAIR(DN)
leg setup $dest callinfo leg_incoming
*****LOG******
091057: Jul 6 13:50:34.345: //10469087//TCL :/tcl_PutsObjCmd: INFO: ***** In UpdateSIPHeaders: CustomHeader - |CED|07747712345|VF_ME|302|1491123456|000|302|VAL11234567891234567891234567891234567|VAL21234567891234567891234567891234567|VAL31234567891234567891234567891234567|VAL412345678912345 67891234567891234567|VAL51234567891234567891234567891234567|VAL61234567891234567891234567891234567|VAL71234567891234567891234567891234567|VAL81234567891234567891234567891234567|VAL91234567891234567891234567891234567|VAL101234567891234567891234567891234567|
091058: Jul 6 13:50:34.345:
091059: Jul 6 13:50:34.345: //10469087//TCL :/tcl_LegObjCmd: leg setup 1491123456 callinfo leg_incoming
091060: Jul 6 13:50:34.345: //10469087//AFW_:/vtd_lg_incoming: argc 4
091061: Jul 6 13:50:34.345: //10469087//AFW_:/vtd_lg_incoming: Legs [10469087 ]
091062: Jul 6 13:50:34.345: //10469087//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
091063: Jul 6 13:50:34.345: //-1//TCL :/tclCmdProtoHeadersHelper: Successful in setting 'protoHeaders' tag-data [headers] instID [0]
091064: Jul 6 13:50:34.345: ccDumpTdRequestDataGen:
091065: Jul 6 13:50:34.345: called_urip=NULL
091066: Jul 6 13:50:34.345: calling_urip=sip:7747712345;phone-context=national@10.161.1.5;user=phone
091067: Jul 6 13:50:34.345: url_dump_header_line_avpair:
091068: Jul 6 13:50:34.345: num_headers = 1
091069: Jul 6 13:50:34.345: headers[0].linep = CH=|CED|07747712345|VF_ME|302|1491123456|000|302|VAL11234567891234567891234567891234567|VAL21234567891234567891234567891234567|VAL31234567891234567891234567891234567|VAL412345678912345, len = 184
091070: Jul 6 13:50:34.345: data.attr.datap = CH=|CED|07747712345|VF_ME|302|1491123456|000|302|VAL11234567891234567891234567891234567|VAL21234567891234567891234567891234567|VAL31234567891234567891234567891234567|VAL412345678912345, len = 2
091071: Jul 6 13:50:34.345: data.value.datap = |CED|07747712345|VF_ME|302|1491123456|000|302|VAL11234567891234567891234567891234567|VAL21234567891234567891234567891234567|VAL31234567891234567891234567891234567|VAL412345678912345, len = 181
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Ashish,
could you please try to split the data into two headers and send.
Thanks,
Raghavendra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got below note from TCl IVR programming guide.
Each call leg is limited to a maximum of 20K memory allocation for header passing. Each header avpair is limited to 256 characters. The application throws an error if the Tcl script tries to pass a header avpair greater than 256 characters or if the 20K memory has been used up.Each call leg is limited to a maximum of 20K memory allocation for header passing. Each header avpair is limited to 256 characters. The application throws an error if the Tcl script tries to pass a header avpair greater than 256 characters or if the 20K memory has been used up.
Thanks,
Raghavendra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Raghavendra,
I have read that in the guide , hence I knew that limit is 256 characters as I explained in my first post.. However why TCL in then truncating the data at 184 Characters rather then 256?
Thanks
Ashish
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.