01-29-2020 01:09 AM - edited 01-29-2020 01:46 AM
Hi all,
I'm trying to achieve using a TCL-IVR application script something that should be simple but for some reason I'm not able to understand how to do it properly. Hope anyone knows how to do that.
I have an IVR that the call should get into, this IVR makes some VXML calls and HTTP requests behind the scenes, and after that it redirects the call to a hunt pilot on CUCM.
What I want to do with an incoming call is to make the voice gateway using TCL send "proceeding" (which works fine) in order for the caller to hear a ringback tone, and on the other hand make a "leg setup" to the IVR number so it'll create a new outgoing leg towards the IVR but I DO NOT WANT to connect between those 2 legs YET. Only after a phone in an hunt pilot answers the call, after redirected from the IVR, I want to detect the relevant event (which should be 'ev_media_update_ind') and connect between those legs.
I tried lots of things, but I cannot make it work. Tried to use the handoff method as I saw in lots of similar (but not much) examples, but I do not know if in my case I need it.
When I'm trying to do the "connection create" command I'm always getting:
Jan 29 09:40:17.313: TCL script failure Result: failed Jan 29 09:40:17.313: TCL script failure errorInfo: failed while executing "connection create $incoming_leg $outgoing_leg" (procedure "act_setup_done" line 33) invoked from within "act_setup_done"
Here are some parts from the code:
proc act_setup { } { global env # if leg contains did if { [infotag get leg_isdid] } { set env(dest) [infotag get leg_dnis]; if { $env(icm_dn) != "" } { set env(dest) $env(icm_dn) } set callInfo(originationNum) [infotag get leg_ani] leg proceeding leg_incoming leg connect [infotag get leg_incoming] leg setup $env(dest) callInfo } else { # } } proc act_setup_done {} { global env set status [infotag get evt_status]; # get the event of the call during the setup_done # if the event status is 'ls_000' means the call setup has passed ok if { $status == "ls_000"} { set incoming_leg [infotag get leg_incoming] set outgoing_leg [infotag get leg_outgoing] connection create $incoming_leg $outgoing_leg } else { # } } set fsm(CALL_INIT,ev_setup_indication) "act_setup CALL_SETUP" set fsm(CALL_SETUP,ev_setup_done) "act_setup_done CALL_ACTIVE" fsm define fsm CALL_INIT
The above snippet is a simple try of mine just to connect both legs of the call, one of them is the caller and the second one is the IVR. When I will accomplish that, I'll try to make it work that only when a phone from the hunt pilot answered the call so only then it'll connect between legs.
Thanks!
Solved! Go to Solution.
02-06-2020 09:05 AM
Hi Slavik,
The following procedures work for me:
proc act_setup { } {
global env
if { [infotag get leg_isdid] } {
set env(dest) [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $env(dest) callInfo
} else {
#
}
}
proc act_setup_done {} {
global env
if { $status == "ls_000"} {
set param(consumeDigit) true
set param(enableReporting) true
leg connect leg_incoming
connection create leg_incoming leg_outgoing
} else {
#
}
}
01-30-2020 03:46 AM
Hi, anyone? :)
02-02-2020 10:05 AM
Just to make sure, can you test changing:
leg setup $env(dest) callInfo
into
leg setup 1234 callInfo
where 1234 is a real extension.
See if it works.
Besides, is the destination IVR local to the CM?
Is it handled by another CM?
If this test fails too, I'll help you dig further into the problem.
02-02-2020 10:32 AM
Hi,
Thanks for replying! :)
I tried both ways, as you suggested, without a variable but with a single number and the same result.
And yes, the destination is a CUCM. An hunt pilot on CUCM.
I'm reaching setup_done event fine, but only when I'm trying to make a connection between both legs I'm getting the error I described. Without getting make a connection, the call that triggered by "leg setup" to an hunt pilot is being answered and phone is kind of in call state, but on the caller side i'm still hearing the ringback tone because of the "proceeding" I'm sending to the incoming leg.
I also tried out to take major parts from your TCL script (the one I sent you PM about) and still the same issue.
BTW, more about the environment if it matters...
PSTN --(sip)--> CUBE --(sip)--> CUCM -> Hunt
CUBE is based on IOS-XE 16.12 firmware. And handling SIP to SIP calls.
Thanks!
02-02-2020 11:09 AM
I wanted you to test if the script works using a real extension, not another tcl.
Can you please try if you get the call connected to a real phone?
02-02-2020 11:26 AM
Hi,
When you say to test it out with a real extension you mean by doing what you suggested above, right?
Like that:
leg setup 1234 callInfo
If so, yes, I already tested it out with a destination of a phone like in the example above. But still the same problem.
And what do you mean by "not another tcl"? The above is triggered only by TCL IVR script.
Thanks! :)
02-02-2020 11:38 AM
I wanted to make sure the problem appears with a real device.
Ok, can you post a full debug with "debug voice application error" (if you can, you can also add voice application session)
02-02-2020 11:54 AM
02-03-2020 12:21 AM
Hi,
Those are the only errors I got from both debugs:
Feb 3 08:18:55.294: //115794//XCCS:/C_PackageXCCSession_AcceptCallCheck: No AcceptCall; XCC application is unregistered Feb 3 08:18:55.300: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured Feb 3 08:18:55.301: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured Feb 3 08:18:55.301: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured Feb 3 08:18:55.301: //115794//Dest:/DestLocalConsultHandoff: no local handoff, intwrk leg 0, consult id 7FC39FC85F20 Feb 3 08:18:55.301: //-1//AFW_:/AFW_Util_RemovePreemptInfoFromContainer: Failed to remove mlppSetupInfo from TD container Feb 3 08:18:55.301: //-1//AFW_:/AFW_Leg_GetTypeDetail: ***ERROR*** pLeg is NULL Feb 3 08:19:01.624: //-1//AFW_:/AFW_Connection_New: Conference Create Failed Feb 3 08:19:01.624: //115794//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR Feb 3 08:19:01.625: TCL script failure Result: failed Feb 3 08:19:01.625: TCL script failure errorInfo: failed while executing "connection create $incoming_leg $outgoing_leg" (procedure "act_setup_done" line 52) invoked from within "act_setup_done" Feb 3 08:19:01.625: //115794//MEDI:/C_MediaFork_Close: Media Fork Not avtive on Leg [115794] Feb 3 08:19:01.625: //115794//MEDI:/C_MediaFork_Close: Media Fork Not avtive on Leg [115795]
Thank you!
02-04-2020 06:05 AM
02-06-2020 09:05 AM
Hi Slavik,
The following procedures work for me:
proc act_setup { } {
global env
if { [infotag get leg_isdid] } {
set env(dest) [infotag get leg_dnis]
leg proceeding leg_incoming
leg setup $env(dest) callInfo
} else {
#
}
}
proc act_setup_done {} {
global env
if { $status == "ls_000"} {
set param(consumeDigit) true
set param(enableReporting) true
leg connect leg_incoming
connection create leg_incoming leg_outgoing
} else {
#
}
}
02-06-2020 10:49 AM
WOW, it is WORKING! Thank you!
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