05-02-2017 12:32 PM - edited 03-17-2019 10:13 AM
Gents,
Can one one here help wth a tcl script that does the following
1. Checks a SIP header in an INVITE ( eg via header or from header) and if the sip header matches a defines address, then
2. shuts down a predefined dial-peer or shuts down sip service on a gateway
Or alternatively does anyone have a tcl script that can shutdown a dial-peer...
05-03-2017 11:26 AM
Hi Deji,
I am not sure how to monitor SIP headers using TCL but this is a good white paper which has TCL script to monitor status and shutdown dialpeer.
http://www.cisco.com/c/en/us/products/collateral/unified-communications/unified-border-element/white_paper_c11-613550.html
Also, have a look at EEM and if it helps
05-04-2017 12:13 AM
Below might help
I think we have to use the method get leg_proto_headers.
You can refer below examplets
https://communities.cisco.com/thread/59525?start=0&tstart=0
proc place_call {called_num caller_name} {
# Gather SIP header information
set From_Header [infotag get leg_proto_headers "From"]
set SIP_From [regexp {.+(<sip:.+@.+)} $From_Header whole_string 2nd_Section]
puts "\n The second half of the SIP From Header is $2nd_Section"
puts "\n Updating the SIP From field to include the caller name, \"$caller_name\""
set SIP_String "\"$caller_name\" "
append SIP_String $2nd_Section
puts "\n SIP From Header is modified to be $SIP_String"
http://www.cisco.com/web/software/283812793/54071/meetme-tcl.txt
Thanks
Haris
05-04-2017 02:23 AM
Haris,
Wao! Thank you.
I do not know TCL scripting at all, so its a totally new adventure :)
My question is this..
Once this TCL script is invoked on the dial-peer, how do I get it to shut down the dial-peer that I am interested in.
I have looked at the link you provided and I am lost :)
05-04-2017 02:26 AM
Thank you Mohammed, I am struggling to understand the example here. The issue I have with EEM is that you need to trigger an event and before EEM can be used. In my scenario the only time I need to shut down one of my dial-peer is when another specific dial-peer is matched.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide