Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Voice Gateway API (VGAPI) Developer Center
Overview
Documentation
Community
Testing
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to TCL-API
can tcl access contents of sip message?
Threads [
Previous
|
Next
]
Showing 1 - 20 of 27 results.
Items per Page
(Changing the value of this field will reload the page.)
5
10
20
30
50
75
Page
(Changing the value of this field will reload the page.)
1
2
of 2
First
Previous
Next
Last
Steve Park
Posts:
4
Join Date:
5/18/09
Recent Posts
can tcl access contents of sip message?
Answer
12/16/11 7:33 AM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
I have done a lot of research but I haven't found the answer.
I am trying to see if tcl can access sip cause code (200OK or 503 no circuit available as an example).
What I am trying to do is based on which sip cause code I get, I want script to play prompts.
so far, I don't think this is possible.
am i wrong?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Vijay Prasad Neelamegam
Posts:
62
Join Date:
2/26/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
3/31/10 5:46 PM as a reply to Steve Park.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Steve,
Yes you are right.We can just get the headers from the INVITE message.AFAIK we cannot access the SIP Cause code through TCL.
Thanks
Vijay
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Steve Park
Posts:
4
Join Date:
5/18/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/1/10 5:55 AM as a reply to Vijay Prasad Neelamegam.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
if cisco API can get all headers from disconnect(which btw I did not see), it doesn't make sense to not be able to get
status code.
does future cisco have any plan to add that to API?
Can you also show me how to access all headers from disconnect?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Steve Park
Posts:
4
Join Date:
5/18/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/1/10 7:24 PM as a reply to Steve Park.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Does anyone know the answer to this?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Anusha Kannappan
Posts:
149
Join Date:
9/15/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/2/10 9:02 AM as a reply to Steve Park.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Steve,
As mentioned in the TCL IVR programming guide for accessing the headers associated with the protocol we can make use of 'leg_proto_headers'
Syntax: infotag get leg_proto_headers [<attribute-name>]
where <attribute-name> is the name of the header to get.
But currently, only access to headers in SIP invite, subscribe, notify and H.323 setup messages are supported.
Also if <attribute-name> is not specified, all headers are returned in a concatenated string, with each header separated by a "&" symbol and if legID is not provided, the first incoming leg is applied.
And related to you question whether there are any future plans for adding this API, please let us share your requirments in detail so that we will pass it on to the marketing team and get back to you with their response.
Thanks,
Anusha
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Steve Park
Posts:
4
Join Date:
5/18/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/5/10 11:38 PM as a reply to Anusha Kannappan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Steve,
As mentioned in the TCL IVR programming guide for accessing the headers associated with the protocol we can make use of 'leg_proto_headers'
Syntax: infotag get leg_proto_headers [<attribute-name>]
where <attribute-name> is the name of the header to get.
But currently, only access to headers in SIP invite, subscribe, notify and H.323 setup messages are supported.
Also if <attribute-name> is not specified, all headers are returned in a concatenated string, with each header separated by a "&" symbol and if legID is not provided, the first incoming leg is applied.
And related to you question whether there are any future plans for adding this API, please let us share your requirments in detail so that we will pass it on to the marketing team and get back to you with their response.
Thanks,
Anusha
Hello, and thank you for your response.
It will be nice to see if API can access all sip messages(not just what you mentioned above) so that it can react to certain response code.(final response in sip. If not, do nothing).
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Travis May
Posts:
22
Join Date:
5/29/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/5/10 8:52 AM as a reply to Steve Park.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
I am having difficulty getting simple headers from the INVITE.
as5350xm
c5350-jk9su2_ivs-mz.150-1.M1.bin
Incoming leg is SIP, I can easily see the From and other headers with "sh debug ccsip mess"
I have tried both
leg_proto_headers and
evt_proto_headers
proc proc_setup_indication { } {
leg proceeding leg_incoming
leg alert leg_incoming -p 8
set headersAll [infotag get leg_proto_headers]
puts "************** headersAll: $headersAll *********************\n\n"
set headersAllLeg [infotag get leg_proto_headers leg_incoming]
puts "************** headersAllLeg: $headersAllLeg *********************\n\n"
set headersFrom [infotag get leg_proto_headers "From"]
puts "************** headersFrom: $headersFrom *********************\n\n"
}
RESULTS from "debug voip app script":
May 4 20:23:53.706: //16492//TCL :/tcl_PutsObjCmd:
************** headersAll: *********************
May 4 20:23:53.706:
May 4 20:23:53.706: //16492//TCL :/tcl_PutsObjCmd:
************** headersAllLeg: *********************
May 4 20:23:53.706:
May 4 20:23:53.710: //16492//TCL :/tcl_PutsObjCmd:
************** headersFrom: *********************
I have even tried moving these commands to later in the call, after the conference is connected. Still, no output.
Thanks,
Travis
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Anusha Kannappan
Posts:
149
Join Date:
9/15/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/5/10 4:59 PM as a reply to Travis May.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Travis,
We will be able to retrieve the headers from the SIP invite message using both the leg_proto_headers as well as the evt_proto_headers. COuld you please share us the running config and the scripts you are trying to excute to drill down issue further? Also what is the dnis value you have when you are making the call?
Thanks,
Anusha.
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Travis May
Posts:
22
Join Date:
5/29/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/6/10 8:22 AM as a reply to Anusha Kannappan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
router#show call application voice protoHeaderTest
Script Name : protoHeaderTest
URL : http://webserver/tcl/protoHeaderTest.tcl
Type : Service
State: Registered
Life : Configured
Exec Instances: 0
Script Code Begin:
--------------------------------
TCL Script version 2.2 or above
proc init { } {
}
proc eventHandler { } {
puts "\n************* EVENT:[infotag get evt_event]********\n"
set callID [infotag get leg_proto_headers "Call-ID"]
puts "\n\n************** callID: $callID *********************\n\n"
set headersAll [infotag get leg_proto_headers]
puts "\n\n************** headersAll: $headersAll *********************\n\n"
set headersAllLeg [infotag get leg_proto_headers leg_incoming]
puts "\n\n************** headersAllLeg: $headersAllLeg *********************\n\n"
set headersFrom [infotag get leg_proto_headers "From"]
puts "\n\n************** headersFrom: $headersFrom *********************\n\n"
set AccountInfo [infotag get leg_proto_headers AccountInfo]
puts "\n\n************** AccountInfo = $AccountInfo *********************\n\n"
call close
}
requiredversion 2.1
init
set fsm(any_state,ev_any_event) "eventHandler,same_state"
fsm define fsm SINGLESTATE
--------------------------------
router#
router#term mon
router#
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************* EVENT:ev_setup_indication********
May 5 20:12:22.359:
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************** callID: *********************
May 5 20:12:22.359:
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************** headersAll: *********************
May 5 20:12:22.359:
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************** headersAllLeg: *********************
May 5 20:12:22.359:
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************** headersFrom: *********************
May 5 20:12:22.359:
May 5 20:12:22.359: //31//TCL :/tcl_PutsObjCmd:
************** AccountInfo = *********************
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Anusha Kannappan
Posts:
149
Join Date:
9/15/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/6/10 12:58 PM as a reply to Travis May.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Travis,
I had gone through the running configs that you had sent to me and found that you are missing the mandatory configs for headers passing. Please include the following configs and try it out.
sip
header-passing
Thanks,
Anusha
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Travis May
Posts:
22
Join Date:
5/29/09
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/6/10 3:08 PM as a reply to Anusha Kannappan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Worked like a charm !
Thanks you very much Anusha
Travis
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Yaw-Ming Chen
Posts:
483
Join Date:
4/9/08
Recent Posts
RE: can tcl access contents of sip message?
Answer
5/19/10 7:43 PM as a reply to Steve Park.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Cannot read SIP cause code but those codes might equal to leg setup status that can we can get it when receive ev_setup_done
For example
200 OK for INVITE treat is as ls_000 and 503 is ls_xxx.
Thanks,
Yawming
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
srikanth satturi
Posts:
67
Join Date:
8/18/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/14/11 10:08 AM as a reply to Anusha Kannappan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Travis,
I had gone through the running configs that you had sent to me and found that you are missing the mandatory configs for headers passing. Please include the following configs and try it out.
sip
header-passing
Thanks,
Anusha
Thanks a lot , this post was very helpful for me. I wanna know one more thing, like after i added header passing I could see
Apr 14 07:53:22.345: //302713//TCL :/tcl_PutsObjCmd: CLI: sip:17607058888@voxbone.com instead of 17607058888. Can we control this.
Thanks
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
srikanth satturi
Posts:
67
Join Date:
8/18/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/14/11 10:19 AM as a reply to srikanth satturi.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
After I did this config change sip header passing, I could see cli is coming as : sip:username@domain instead of 17607058888.
Is there anyway so that CLI and CLD remains same.
Srikanth
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
srikanth satturi
Posts:
67
Join Date:
8/18/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/14/11 1:39 PM as a reply to srikanth satturi.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
After I did this config change sip header passing, I could see cli is coming as : sip:username@domain instead of 17607058888.
Is there anyway so that CLI and CLD remains same.
Srikanth
please anyone help me out
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Raghavendra Gutty Veeranagappa
Posts:
218
Join Date:
4/28/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/14/11 2:02 PM as a reply to srikanth satturi.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Srikanth,
As per sip uri standards it is not possible to change, sip uri must contain username and domain .
Thanks,
raghavendra
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
srikanth satturi
Posts:
67
Join Date:
8/18/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/14/11 4:03 PM as a reply to Raghavendra Gutty Veeranagappa.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Thanks a lot Raghavendra.
Does adding sip header-passing in config will have any negative affect on performance of AS5400. If yes, what percentage will it be.
And is there anything to be handled explicitily after this change.
Srikanth
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Raghavendra Gutty Veeranagappa
Posts:
218
Join Date:
4/28/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/15/11 10:39 AM as a reply to srikanth satturi.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Srikanth,
I don't think there will be any platform specific issue due to the cli and no need to configure anything after configuring sip header-passing.
Thanks,
Raghavendra
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
srikanth satturi
Posts:
67
Join Date:
8/18/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/19/11 12:54 PM as a reply to Raghavendra Gutty Veeranagappa.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Thanks a lot
Here is the issue i am facing with after I enabled sip header passing
I have a translation rule
voice translation-rule 7
rule 1 /\+/ //
!
this rule is applied through translation profile on dial-peer for incoming number
this rule is supposed to strip '+' from CLI
Example : CLI : +99999999999 it will come into script as 99999999999
right now CLI coming as sip:99999999999@domain.. so this rule is getting failed. How can I make a workaround so I could able to apply translation rule on CLI.
please help me out.
Thanks a lot
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Raghavendra Gutty Veeranagappa
Posts:
218
Join Date:
4/28/10
Recent Posts
RE: can tcl access contents of sip message?
Answer
4/19/11 2:11 PM as a reply to srikanth satturi.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hi Srikanth,
you mean to say that after configuring sip header-passing you are getting sip:99999999999@domain, before your getting sip:+99999999999@domain, if so could you please send us the logs and also explain breifly about your call flow.
Thanks,
Raghavendra
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Showing 1 - 20 of 27 results.
Items per Page
(Changing the value of this field will reload the page.)
5
10
20
30
50
75
Page
(Changing the value of this field will reload the page.)
1
2
of 2
First
Previous
Next
Last