Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Final Hurdle... TCL Timer Script With EEM

Hi all,

After bashing the keyboard for the last 3 days, I believe I am nearly there but require some assistance as to the last hurdle.

Essentially, I have a script that has a timer built in and that is applied to the inbound dial-peer. Users hear a prompt and are put through to a CUE IVR system. If they exceed the timer set on the script, the call should disconnect.

Now, from what I have seen, the script never disconnects the call because it is no longer in charge of the call leg (goes to default application), so I used handoff instead of call setup, and handoff return to get the call back but that doesn't work. So I thought of another way of doing it which is via the generation of a syslog message by the TCL script and tie that to EEM.

From the EEM, I want to parse the syslog, get the ani or dnis and clear the call that way. Messy but I believe it will work.

That is where I am at the moment as I don't know how to setup an action to pull out specific information from the syslog such as DNIS and then use that in a variable to carry out an action which has a clear call command within it. So my EEM currently has a trigger which is a specific phrase and from that, the EEM policy goes through its actions but as stated, can't parse that message which triggered the EEM.

Example:

%IVR-2-APP_CRIT: Maximum call time reached from calling number 88888888

event manager applet ClearCall

event syslog pattern %IVR-2-APP_CRIT: Maximum call time"

action 01.0 cli command "enable"

action 02.0 cli command (believe parsing for the number 88888888 required here)

7 REPLIES
New Member

Re: Final Hurdle... TCL Timer Script With EEM

Ok, I am making progress but would appreciate some help on this...

I am now at the applet stage and trying to put the ani into a variable and use that to clear the call but I can't populate the variable... something is missing here and the documentation is scant. Any pointers would be appreciated.

event manager applet MaxCallDurationReached

event syslog pattern "%IVR-2-APP_CRIT: Maximum call time reached for calling number"

action 01.0 info type syslog history

action 02.0 regexp "(%IVR-2-APP_CRIT:Maximum call time reached for calling number)" "(.*)" $_info_syslog_hist_msg_1 _match _sub2

action 03.0 cli command "enable"

action 04.0 cli command "clear call voice causecode 16 called-number $_match"

EDIT: Ok, I now know that the variable $_info_syslog_hist_msg_1 is EMPTY! Don't understand how or why.

New Member

Re: Final Hurdle... TCL Timer Script With EEM

Looks like your regexp has the expression and string backwards. It should be:

regexp reg_expression string matchVar subMatchVar1 subMatchVar2

New Member

Re: Final Hurdle... TCL Timer Script With EEM

Hi,

Thank you for your input. I am further along than I was before...

I am matching on a regexp that contains "Maximum call time..." with the string in the variable $_info_syslog_hist_msg_1.

"\(.* Maximum call time reached for calling number\) \(.*\)" "$_info_syslog_hist_msg_1" _match _sub2

Apart from _match being empty, I think I have encountered a problem. I was using the $_info_syslog_hist_msg_1 and I see it provide other messages such as "configured from console", etc.

Not sure why again but all I want is to use the original syslog message trigger, regexp it and put the output into a command. Shouldn't be to hard when put that way but unfortunately it is.

New Member

Re: Final Hurdle... TCL Timer Script With EEM

Is _sub2 also empty? Based on your regular expression I would expect that to contain the number and _match the string. That little space between the '.*' and 'Maximum' might be a problem too.

New Member

Re: Final Hurdle... TCL Timer Script With EEM

Ok, still the same issue.

And _sub2 is also empty.

Here's the EEM config in its entirety...

event manager applet MaxCallDurationReached

event syslog pattern "%IVR-2-APP_CRIT: Maximum call time reached for calling number"

action 01.0 info type syslog history

action 01.4 info type syslog frequency

action 01.5 puts "1.5 HISTORY MESSAGE IS $_info_syslog_hist_msg_1"

action 02.0 regexp "\(.*Maximum call time reached for calling number\) \(.*\)" "$_info_syslog_hist_msg_1" _match _sub2

action 02.5 puts "2.5 HISTORY MESSAGE IS $_info_syslog_hist_msg_1"

action 02.6 puts "2.6 _sub2 message $_sub2"

action 03.0 cli command "enable"

action 04.0 cli command "clear call voice causecode 16 called-number $_match"

!

Any other suggestions would be gratefully accepted because I am hitting a wall each time I try something.

New Member

Re: Final Hurdle... TCL Timer Script With EEM

I guess the easiest way would be to get the output of show call active voice brief, parse that for the call legs and the time, and disconnect the call based on that.

Back to the drawing board...

New Member

Re: Final Hurdle... TCL Timer Script With EEM

Hi again,

Now I am at my wits end, quite literally.... I am trying to get the EEM Script working and its function is to perform the command:

show call active voice brief | PID:100|dur 00:30:

This is put onto multiple lines but I need a way of putting this into a variable of sorts I believe, string it so only one PID and dur are one line, regexp the call ID from it, and then I can terminate the call.

Why can't Cisco just put the long call duration timer on the normal platforms instead of the AS53XX.

Any help or even pointers would be appreciated.

205
Views
0
Helpful
7
Replies
CreatePlease login to create content