PureConnect

 View Only
Discussion Thread View
Expand all | Collapse all

Problems with Play Audio File tool step…

  • 1.  Problems with Play Audio File tool step…

    Posted 06-07-2011 13:38
    Hi, I have made a handler that in short terms connects a call to an external survey and it works fine. Now I wanted to add a Play Audio File that executes in the beginning of the handler but it never plays the audio file. I have recorded the file with the same format as all our other prompts and put it in the Resources Patch set in the server parameters. Inputs on the Play Audio File tool step… Call Identifier: Interaction1 Audio File Name (.wav): "T_VoC_Transfer_DK.wav" Key(s) to Increase Volume:? Key(s) to Decrease Volume:? Key(s) to Skip Forward:? Key(s) to Skip Backwards:? Skip Amount (seconds): 10 Key(s) to Increase Playback Speed: ? Key(s) to Decrease Playback Speed:? Immediate Mode:false Anyone got any clue on why the audio file isn't played?


  • 2.  RE: Problems with Play Audio File tool step…

    Posted 06-07-2011 14:48
    What format is the WAV file saved in? The format that the CIC server likes the best is 8bit 8KHz Mono CCITT u-law?I would confirm you are passing in the correct Call ID to play back the recording. When you debug the hander do you see values in the Call ID variable in your handler? Also you could turn up logging on the IP subsystem and look at the log as IP should be able to shed some light on why the file is not playing.


  • 3.  RE: Problems with Play Audio File tool step…

    Posted 06-07-2011 19:28
    You'll also need to make sure you flush the audio. You can do this with either a Flush Audio, Get Key, or Extended Get Key toolstep.


  • 4.  RE: Problems with Play Audio File tool step…

    Posted 06-08-2011 07:36
    The file is a 8bit 8KHz Mono CCITT u-law WAV-file. Don't see any errors in the IP log and tried with a flush audio but didn't help. Any more suggestions?


  • 5.  RE: Problems with Play Audio File tool step…

    Posted 06-08-2011 14:10
    I never got the flush audio step to work, however I do have good luck if I use a get key step, remove all valid keys, escape keys and set the timeout to 0.01 seconds. Try a get key step and see if that does it for you. Also, when you debugged the handler do you see your call ID variable populated with values?


  • 6.  RE: Problems with Play Audio File tool step…

    Posted 06-09-2011 07:45
    Originally posted by MarkT;22322
    I never got the flush audio step to work, however I do have good luck if I use a get key step, remove all valid keys, escape keys and set the timeout to 0.01 seconds. Try a get key step and see if that does it for you. Also, when you debugged the handler do you see your call ID variable populated with values?
    Tried that as well but with no luck... =( What is the correct way to add the file name of the WAV-file? Is it with .wav or not? If i want to enter a full path to file how do i do that? I don't allow me to enter for example "d:\T_VoC_Transfer_NO.wav"...


  • 7.  RE: Problems with Play Audio File tool step…

    Posted 06-09-2011 12:45
    Enter the entire file name including the .wav Check the path in Server Parameter "Resource Path". If the file is in this folder then you don't need the d:\ just enter the filename for example "myfiletoplay.wav" The toolstep "Get File Statistics" on the File I/O tab is very helpful in these situations for troubleshooting. If this toolstep fails then you know the file is not found with the filename you have entered.


  • 8.  RE: Problems with Play Audio File tool step…

    Posted 06-10-2011 11:57
    Originally posted by mridings;22349
    Enter the entire file name including the .wav Check the path in Server Parameter "Resource Path". If the file is in this folder then you don't need the d:\ just enter the filename for example "myfiletoplay.wav" The toolstep "Get File Statistics" on the File I/O tab is very helpful in these situations for troubleshooting. If this toolstep fails then you know the file is not found with the filename you have entered.
    Resource Path in Administrator is set to "D:\I3\IC\Resources". I have put i file called test.wav in that path. The file isn't played by "Play Audio File" and with "Get File Statistics" i don't get any values (all time values is set to current date/time) Input is set as "test.wav"


  • 9.  RE: Problems with Play Audio File tool step…

    Posted 06-10-2011 12:28
    Try entering "d:\\i3\\ic\\resources\\test.wav" You need the double backslash, not a single backslash.


  • 10.  RE: Problems with Play Audio File tool step…

    Posted 06-10-2011 12:45
    Originally posted by mridings;22365
    Try entering "d:\\i3\\ic\\resources\\test.wav" You need the double backslash, not a single backslash.
    Tried that but no luck... =(


  • 11.  RE: Problems with Play Audio File tool step…

    Posted 06-10-2011 13:01
    You tried that string in the GetFileStatistics step? If you can't get the file stats then it sounds like you don't have rights to the folder but that is unlikely. Try a DirectoryList step with Directory Path = "d:\\i3\\ic\\resources" and Directory Mask = "*.wav" . What does it return? I've attached a handler for testing this.


  • 12.  RE: Problems with Play Audio File tool step…

    Posted 06-10-2011 13:39
    Originally posted by mridings;22369
    You tried that string in the GetFileStatistics step? If you can't get the file stats then it sounds like you don't have rights to the folder but that is unlikely. Try a DirectoryList step with Directory Path = "d:\\i3\\ic\\resources" and Directory Mask = "*.wav" . What does it return? I've attached a handler for testing this.
    When i try Directory List tool step and run debug i get "0 item(s) in list." I tried with different path and masks and the same result.


  • 13.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 02:23
    sPiNNiFeX, I built this simple handler to play an audio file, and it also uses a Get File Statistics toolstep. It plays this file: C:\I3\IC\Resources\test.wav I called this handler from an Attendant 'Run Subroutine' node. This should help you out. Note: This handler is provided "as-is", and is not supported by Interactive Intelligence. It is only to be used as an example. [ATTACH]402[/ATTACH]


  • 14.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 08:58
    Originally posted by malcolm.rogers;22403
    sPiNNiFeX, I built this simple handler to play an audio file, and it also uses a Get File Statistics toolstep. It plays this file: C:\I3\IC\Resources\test.wav I called this handler from an Attendant 'Run Subroutine' node. This should help you out. Note: This handler is provided "as-is", and is not supported by Interactive Intelligence. It is only to be used as an example. [ATTACH]402[/ATTACH]
    That's more or less exactly how I have done but the handler I use is executed with a client button instead. Now I added you handler to run as an subroutine that handler and it still don't play any audio. The get file statistics doesn't fail but don't get any statistics just the time and date when the tool step run. But if i run the handler as subroutine from Attendant it works fine. So why doesn't it work when you call the handler from a client button?


  • 15.  RE: Problems with Play Audio File tool step…

    GENESYS
    Posted 06-13-2011 09:12
    It sounds like the handler you are calling the subroutine from is not passing the correct Call ID into the subroutine. Make sure there is only one Call ID (usually named Interaction1) in the calling handler, and make sure when you debug your subroutine the Call ID variable (Interaction1 by default) has a value, and if it has a value make sure it is the correct Call ID.


  • 16.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 09:23
    Originally posted by GGanahl;22406
    It sounds like the handler you are calling the subroutine from is not passing the correct Call ID into the subroutine. Make sure there is only one Call ID (usually named Interaction1) in the calling handler, and make sure when you debug your subroutine the Call ID variable (Interaction1 by default) has a value, and if it has a value make sure it is the correct Call ID.
    I have done that and its the correct CallID. In the handler i do a lot of other stuff like getting other attributes from the CallID and it works great. But Play Audio File and Get File Statistics don't work at all.


  • 17.  RE: Problems with Play Audio File tool step…

    GENESYS
    Posted 06-13-2011 11:01
    Yet the exact same handler works fine when called as a subroutine from Attendant? I'm out of ideas. Can you post your handler?


  • 18.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 14:31
    When you are in the subroutine can you check the Call Attribute Eic_CallState. Is it possible that the call is in some funky state that is causing the wav file to not play?


  • 19.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 18:06
    I'm interested that you mentioned that a Get File Statistics also fails. This would lead me to believe that the file name/path is invalid. How is the name of the file and path to the file generated?


  • 20.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 21:11
    Originally posted by GGanahl;22408
    Yet the exact same handler works fine when called as a subroutine from Attendant? I'm out of ideas. Can you post your handler?
    Here are the handler. [ATTACH]403[/ATTACH] Little bit messy at the moment...


  • 21.  RE: Problems with Play Audio File tool step…

    Posted 06-13-2011 21:18
    So hard coded path and wav file name... What shows up in the IP/TSServer logs when a call passes through this handler and the audio play fails? Side question - do you by chance have media servers and if so are they enabled for basic or advanced features?


  • 22.  RE: Problems with Play Audio File tool step…

    Posted 06-14-2011 04:37
    The above posts mention good points that should be checked, however... If you're calling this handler from a client button, that means it's a new thread firing on the call object, and probably doesn't have control of the call. You should try adding a "Set Call State" toolstep to the handler, before you play the audio. The only parameter you need to change is "Claim control of the call", set that to true. This will give the new thread permission/control to act on the call. You should then hear the audio file being played to that call, assuming everything else is in order.


  • 23.  RE: Problems with Play Audio File tool step…

    Posted 06-14-2011 07:12
    Originally posted by malcolm.rogers;22422
    The above posts mention good points that should be checked, however... If you're calling this handler from a client button, that means it's a new thread firing on the call object, and probably doesn't have control of the call. You should try adding a "Set Call State" toolstep to the handler, before you play the audio. The only parameter you need to change is "Claim control of the call", set that to true. This will give the new thread permission/control to act on the call. You should then hear the audio file being played to that call, assuming everything else is in order.
    "Set Call State" did the trick!!! Thanks for all your help!


  • 24.  RE: Problems with Play Audio File tool step…

    Posted 03-23-2012 08:17
    Originally posted by sPiNNiFeX;22425
    "Set Call State" did the trick!!! Thanks for all your help!
    Yesterday we installed SU14 and now the sound file isn't played again... Eic_CallState:Connected Anyone have any tips on why? (Feeling kinda empty in my head after an 18h workday yesterday and only ~3hrs sleep)


  • 25.  RE: Problems with Play Audio File tool step…

    Posted 03-23-2012 20:38
    Check the IP log, it may tell you why it did not play. Also sometimes there is an error written to the event log when the files can't play. Another thing to try is deleting the step and recreating it. Sometimes I3 changes toolsteps in SUs so they won't work correctly until you delete and recreate them but I don't see anything in the notes for the SU14 update regarding the Play Audio File toolstep changing.


  • 26.  RE: Problems with Play Audio File tool step…

    Posted 03-26-2012 06:44
    TS log may also provide insight as to why the file may not be playing.


Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources