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
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can not see the whole picture you may need to post your script or at least related section.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Yawchen,
Here is the script and callflow:
Thanks and Regards,
Bhavya Ramaswamy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 | ||||
} | ||||
} |
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi
is worked this script ? But I uploaded can not workimg.please share last script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can check the conditions after collecting the digits in act_GotDest procedure.
For example :
if { $dest == "0" } {
set dest $oprtr
}
Thanks,
Raghavendra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I changed set dest 94735646 , but not work , play reenter prompt.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
could you please collect the logs with debugs "debug voip app" .
Thanks,
Raghavendra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi İ collected debug and attached.
Thank you for your help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
looks like you need to change the code in different place
if { $dest == "0" } {
set dest $oprtr
#handoff callappl leg_incoming default "DESTINATION=$dest"
leg setup $dest callInfo leg_incoming
} else {
act_Select
}
Thanks,
Raghavendra
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.