cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
464
Views
10
Helpful
4
Replies

TCL script to shut down dial-peer

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

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...

Please rate all useful posts
4 Replies 4

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

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

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 :)

Please rate all useful posts

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.

Please rate all useful posts