07-10-2014 11:29 PM
Hi we have a TCL script which outpulses account number as DTMF to an 800 number and while this outpulse occurs the inbound caller hears music. The music file does not play continuously instead repeats itself every 1 secs sounding like a broken record. The call flow is as follows
PSTN--> GW-->CVP-->ICM-->Xfer to 800XXXXXXX*123456-->inbound dial-peer on GW which invokes TCL-->outgoing pots dial-peer-->PSTN.
Everything else with this application works fine except for the music file.
Thanks for the help
Preetham
Solved! Go to Solution.
07-14-2014 09:45 PM
07-11-2014 12:09 AM
Hi Preetham,
When you say "music file does not play continuously" are you referring to incoming leg, from your script i see below code will run every time you play digit.
# playing music on hold to incoming
media play $incoming flash:en_moh.au
you can you use below arguments for media play command to play digits or phone number.
– %pnum—Plays a phone number. The maximum number of digits is 64. This does not insert any
text, such as “the number is,” but it does put pauses between groups of numbers. It assumes
groupings as used in common numbering plans. For example, 18059613641 is read as 1 805 961
3641. The pauses between the groupings are 500 ms.
– %nnum—Plays a string of digits without pauses.
for more information please refer our TCL IVR programming guide in below location.
Thanks,
Raghavendra
07-11-2014 08:38 AM
Hi Raghavendra,
The music is played to the incoming leg. The digits are played correctly, we have no issues there. It is just that the music file does not play continuously, it seems like it starts, plays for a sec then stops and starts again. This happens till all the digits are out pulsed. If you have any inputs to modify the way music is being played to the incoming leg so that it plays in continuity, please share.
Thanks
Preetham
07-11-2014 01:12 PM
I wonder if this has something to do with out pulsing the DTMF. Try play audio file to out leg instead of dtmf tone. I know this doesn't solve your issue but know the cause may help to find a solution.
07-13-2014 10:19 PM
Hi Preetham,
You are playing music to incoming leg every time you play digit to outgoing leg because of that it stops and starts again.
you can set playmoh 0 in act_Setup so that it play once.
if {$playmoh == 0} {
# playing music on hold to incoming
media play $incoming flash:en_moh.au
set playmoh 1
}
Thanks,
Raghavendra
07-14-2014 01:03 PM
Hi Raghavendra,
I am not very familiar with TCL scripting, but I did attempt what you asked me to do. Here is the sample of what I did and I got the same result. Let me know if this is correct.
proc act_SendDigits { } {
global account_num
global currentDigit
global stringLength
global incoming
global outgoing
global playmoh
set playmoh 0
if {$playmoh == 0} {
# playing music on hold to incoming
media play $incoming flash:en_moh.au
set playmoh 1
}
set d [string index $account_num $currentDigit]
puts "\n\n******* current = $currentDigit, length = $stringLength ********\n"
if {$currentDigit < $stringLength} {
set prompt flash:en_$d.wav
media play $outgoing %s300 $prompt
set currentDigit [expr {$currentDigit + 1}]
} else {
# stop music after finish playing DTMF
fsm setstate SENDDIGITDONE
media stop $incoming
connection create $incoming $outgoing
}
}
07-14-2014 09:45 PM
07-16-2014 07:47 AM
Hi Raghavendra,
Thank you for the script. The music plays continuously now. There is one behavior I am seeing where the music stops just before sending the last digit which in turn creates about 4secs of silence. Is there a way to have the music play till all the digits are sent. If we can't thats ok, but thank you very much for your help.
Thanks
Preetham
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