04-10-2014 09:37 AM
Hi all,
Can you please advise how i can verify if DigitCollect is already active on a call leg.
If ( DigitCollectLeg is not Active on leg)
{
# Issue DigitCollect on Leg
leg collectdigits leg_incoming PARAM
}
Solved! Go to Solution.
04-14-2014 03:38 PM
Can you please also collect deb voip app tcl and deb voip app scr.
I see you try to collect digit again, in what condition ? No digit entered ? Wrong digit ?
04-10-2014 03:24 PM
You need to keep track of it by yourself.
For example
initialize "commandHandle" or a variable beginning of you script -- set commandHandle 0
Then somewhere in your script when you call leg collectdigits command
leg collectdigits leg_incoming PARAM2
set commandHandle [infotag get last_command_handle]
Now we have something else for commandHandle
You can check the value of commandHandle when it is needed and use "command terminate" if you need to terminate "leg collectdigits" command
set returnCode [command terminate $commandHandle]
04-14-2014 01:39 PM
Hi Yawchen,
Thank you!.
I still receive an error even when the terminate command is issued.
Code Snippet:
set commandHandle [infotag get last_command_handle]
puts "\ncommandHandle = $commandHandle"
set ifDigitCollect [string first "DigitCollect" $commandHandle]
if { $ifDigitCollect == "0" } {
puts "\n Digit Collect already exists"
command terminate $commandHandle
leg collectdigits leg_incoming PARAM
media play leg_incoming _welcome.au
} else {
puts "\n Issuing Digit Collect"
leg collectdigits leg_incoming PARAM
media play leg_incoming _welcome.au
}
Logs:
7786038: Apr 14 16:35:20.716: //14297//TCL :/tcl_PutsObjCmd:
commandHandle = DigitCollect_0x49BD855C_0_1135919956
7786039: Apr 14 16:35:20.716:
7786040: Apr 14 16:35:20.716: //14297//TCL :/tcl_PutsObjCmd:
Digit Collect already exists
7786041: Apr 14 16:35:20.716:
7786042: Apr 14 16:35:20.716: //14297//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR
7786043: Apr 14 16:35:20.716: TCL script failure
Result:
DigitCollect Command already active on leg
7786044: Apr 14 16:35:20.716: TCL script failure errorInfo:
DigitCollect Command already active on leg
while executing
"leg collectdigits leg_incoming PARAM"
(procedure "act_Again" line 22)
invoked from within
04-14-2014 02:35 PM
Can not see the whole picture you may need to post your script or at least related section.
04-14-2014 03:02 PM
04-14-2014 03:38 PM
Can you please also collect deb voip app tcl and deb voip app scr.
I see you try to collect digit again, in what condition ? No digit entered ? Wrong digit ?
04-15-2014 04:24 AM
Hi Bhavya,
As Yawming suggested, initially you can set commandHandle 0, when first time your issuing the leg collectdigits you can set last_command_handle then before second time your issuing leg collectdigits check if commandHandle not equal to zero if so terminate the command and issue the leg collectdigits.
Thanks,
Raghavendra
04-15-2014 08:24 AM
Hi Yawchen, Raghavendra,
Thanks much.
set returnCode [command terminate $commandHandle] worked.
I was trying command terminate [$commandHandle] per the documents and it did not work.
The step started working after i removed the square braces.
if { $dest == "1" } { | ||||
media play leg_incoming _address.au | ||||
set commandHandle [infotag get last_command_handle] | ||||
puts "\ncommandHandle = $commandHandle" | ||||
set ifDigitCollect [string first "DigitCollect" $commandHandle] | ||||
if { $ifDigitCollect == "0" } { | ||||
puts "\n Cancelling digit collect" | ||||
command terminate $commandHandle | ||||
} | ||||
} |
....
01-29-2016 01:44 AM
Hi
is worked this script ? But I uploaded can not workimg.please share last script
01-29-2016 02:27 AM
Hi Aydin,
If you are looking for its-cisco.2.0.2.0 script, you can download from the below link.
latest 2.0.3.0 is available in the below location.
https://developer.cisco.com/site/voice-gateway/downloads/sample-scripts/index.gsp
Thanks,
Raghavendra
01-29-2016 03:18 AM
Hi Gutty
Now this scrit working .But I changing script.I want to menu option ; for examle press 1 to 4000 , press 2 3000 and wrong number repeat position.
Thanks
01-29-2016 03:36 AM
You can check the conditions after collecting the digits in act_GotDest procedure.
For example :
if { $dest == "0" } {
set dest $oprtr
}
Thanks,
Raghavendra
01-29-2016 03:54 AM
Hi
Thank you for your help.I change below for menü option 1-2-3 .but not worked.
if { ($status == "cd_004") } {
set dest
set destExtLen
set extLength
if { $dest == "0" } {
set dest $oprtr
}
if { $dest == "1" } {
leg setup "94735646" callInfo leg_incoming
}
if { $dest == "2" } {
leg setup "94735648" callInfo leg_incoming
}
if { $dest == "3" } {
leg setup "94735649" callInfo leg_incoming
}
#handoff callappl leg_incoming default "DESTINATION=$dest"
if {($maxExtensionLen > 0) && ($extLength >= 0)} {
leg setup $dest callInfo leg_incoming
} else {
set busyPrompt invalidextn.au
act_Select
}
01-29-2016 04:10 AM
I think you can set destination as below instead of issuing leg setup agian as there is code below to do that.
set dest 94735646
Thanks,
Ragahvendra
01-29-2016 04:32 AM
I changed set dest 94735646 , but not work , play reenter prompt.
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