[cisco-voip] RE: TCL IVR 2.0 - proto_headers

Juan Pablo Romero (IFX AR) jpablo.romero at ifxnw.com.ar
Mon Oct 24 13:47:46 EDT 2005


I’m trying to write a TCL application in order to read the SIP header in
the INVITE message and detect whether a call has been forwarded or not,
by reading the content of the “Diversion” field.
According to Cisco’s documentation, there are two ways of reading the
information inside that header, as shown in the extract below:
 

leg_proto_headers


Description 
Provides access to headers associated with the protocol being used. 

Syntax 
infotag get leg_proto_headers [<attribute-name>] [legID] 
<attribute-name>—Name of the header to get. 

Mode 
Read 

Scope 
Global 

Return Type 
String 

Direct Mapping 
None 

Example 
set AccountInfo [infotag get leg_proto_headers AccountInfo] 
set inviteSubject [infotag get evt_proto_headers "Subject"] 
set inviteFrom [infotag get leg_proto_headers "From" leg_incoming]
 
The following command returns all headers received from the incoming
Invite message in a concatenated string. Each header av-pair is
separated by a `&': 
set allHeaders [infotag get evt_proto_headers]
 

Usage Notes 
•This information tag allows the accessing of SIP headers from VXML
documents or TCL IVR 2.0 scripts. 
•Currently, only access to headers in SIP invite, subscribe, notify and
H.323 setup messages are supported. 
•If <attribute-name> is not specified, all headers are returned in a
concatenated string, with each header separated by a "&" symbol. 
•If legID is not provided, the first incoming leg is applied. 
 
I tested those two methods in an IP-to-IP GW with the latest IOS,
without success.  Even when no errors were reported by the TCL
application, no information could be retrieved.
 
Using a 5300 with PRI trunks, I got the following errors when trying to
read the headers:
 
1)     WITH “evt_proto_headers”:
 
Oct 19 19:55:30 UTC: 
Oct 19 19:55:30 UTC: //936555//TCL2:/TclInterpDriver: Tcl_Eval Failed in
action=act_Setup code=1 
code=ERROR
Oct 19 19:55:30 UTC: IVR TCL script failure 
        Result:
                         getInfo::Unrecognized VAR_TAG:
evt_proto_headers
Oct 19 19:55:30 UTC:    IVR TCL script failure errorInfo:
                        getInfo::Unrecognized VAR_TAG: evt_proto_headers
    while executing
"infotag get evt_proto_headers"
    invoked from within
"set headerDump [infotag get evt_proto_headers]..."
    (procedure "act_Setup" line 19)
    invoked from within
"act_Setup"                                                    
 
 
 
   2) WITH “leg_proto_header”:
 
Oct 19 20:18:12 UTC: //936759//TCL2:/TclInterpDriver: Tcl_Eval Failed in
action=act_Setup code=1 
code=ERROR
Oct 19 20:18:12 UTC: IVR TCL script failure 
        Result:
                         getInfo::Unrecognized VAR_TAG:
leg_proto_headers
Oct 19 20:18:12 UTC:    IVR TCL script failure errorInfo:
                        getInfo::Unrecognized VAR_TAG: leg_proto_headers
    while executing
"infotag get leg_proto_headers "From" leg_incoming"
    invoked from within
"set fromHeader [infotag get leg_proto_headers "From" leg_incoming]..."
    (procedure "act_Setup" line 24)
    invoked from within
"act_Setup"      
 
            Does anyone have any working code that uses this new
functionality?  If so, could you please let me know which equipment and
IOS you’re using?
            Thanks, 
 
JP
 
Juan Pablo Romero
IFX Networks
 
 
IMPORTANT NOTICE:

This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you
have received this message in error, you are hereby notified that we do
not consent to any reading, dissemination, distribution or copying of
this message.  If you have received this communication in error, please
notify the sender immediately  and destroy the transmitted information.
IMPORTANT NOTICE:



This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you
have received this message in error, you are hereby notified that we do
not consent to any reading, dissemination, distribution or copying of
this message.  If you have received this communication in error, please
notify the sender immediately and destroy the transmitted information.





-- 

No virus found in this incoming message.

Checked by AVG Free Edition.

Version: 7.1.361 / Virus Database: 267.12.5/147 - Release Date:
10/24/2005

 

 


-- 

No virus found in this outgoing message.

Checked by AVG Free Edition.

Version: 7.1.361 / Virus Database: 267.12.5/147 - Release Date:
10/24/2005

 
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://puck.nether.net/pipermail/cisco-voip/attachments/20051024/ada80b82/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 73 bytes
Desc: not available
Url : https://puck.nether.net/pipermail/cisco-voip/attachments/20051024/ada80b82/attachment-0001.gif


More information about the cisco-voip mailing list