Re: [Opalvoip-user] IVR endpoint - correct behavior
Brought to you by:
csoutheren,
rjongbloed
From: Robert J. <ro...@vo...> - 2013-02-27 06:04:13
|
Practically speaking, Text to Speech is the only "official" way to announce such a varied output as a time. There is no way to add a bunch of predefined WAV files or anything like that. In VXML, it would be possible to use the "expr" attribute of <audio> instead of "src", like <audio expr="'file:test/voice/'+getHours()+'.wav"> which would result in looking for 20.wav at 8pm. You would then need a large number of WAV files, of course. Especially for minutes. Or a very complicated script with <if> sections for special cases and then modulo arithmetic for "40.wav" and "6.wav", instead of just "46.wav". The problem will then be limitations of the current VXML implementation. As is often the case, features are added on an "as needed" basis. One of those things we haven't needed is full ECMA script (in essence Java script) support. While "expr" is supported it has simple string concatenation only, and certainly not functions like getHours(). *Robert Jongbloed* /OPAL/OpenH323/PTLib Architect and Co-founder./ Commercial support at http://www.voxlucida.com.au On 23/02/2013 12:02 AM, liviu ursulescu wrote: > Ok, thanks a lot for the information. I was trying to do that because > I need to announce the time wheb the user called (like 14:23). > it was something like: > ... > <audio src="file:test/voice/fourteen.wav"> > </audio> > <audio src="file:test/voice/twenty.wav"> > </audio> > <audio src="file:test/voice/three.wav"> > </audio> > ... > and forcing the connection to switch to this vxml. > Is there any other way to announce the time, preferably not using TTS > but some vxml programing? Don't know if this is the right place to ask > it, but seems to be related somehow. > This is the main problem that I've encountered and I thought that > bypassing might be a solution > thanks a lot, liviu > > --- On *Tue, 2/12/13, Robert Jongbloed /<ro...@vo...>/* > wrote: > > > From: Robert Jongbloed <ro...@vo...> > Subject: Re: [Opalvoip-user] IVR endpoint - correct behavior > To: opa...@li... > Date: Tuesday, February 12, 2013, 7:51 AM > > You should be using the <goto> element rather than trying to do it > in the C++ code. The "expr" attribute can be any URL, including a > "http:" or "file:" for a completely new VXML script. > > Similarly, you really should not be using OnUserInputString() but > using the appropriate VXML data entry elements. > > There examples of these in the test.vxml file in the ivropal > directory. > > *Robert Jongbloed* > /OPAL/OpenH323/PTLib Architect and Co-founder./ > Commercial support at http://www.voxlucida.com.au > <http://www.voxlucida.com.au/> > On 6/02/2013 10:31 PM, liviu ursulescu wrote: >> Hello everybody >> >> I'm using the IVR endpoint to play some messages. It works fine >> when playing in a loop, just transfer the connection to the same >> vxml when OpalIVREndpoint::*OnEndDialog* occurs. >> now the problem: >> There are cases where I want to switch to another vxml before the >> current one si finished when pressing a certain key. For that im >> using the OpalManager::*OnUserInputString, *and then the >> TransferConnection(newVxml). >> when doing that, in almost every case, I get the segmentation >> fault insde >> *PVXMLChannel::Read()* where m_currentPlayItem is null. >> And is set to null by the *PVXMLChannel::FlushQueue*() function >> (as far as I can see) >> Is there a way to avoid this? What am I doing wrong, or inaproriate?? >> thanks a lot, liviu. >> >> >> >> ------------------------------------------------------------------------------ >> Free Next-Gen Firewall Hardware Offer >> Buy your Sophos next-gen firewall before the end March 2013 >> and get the hardware for free! Learn more. >> http://p.sf.net/sfu/sophos-d2d-feb >> >> >> _______________________________________________ >> Opalvoip-user mailing list >> Opa...@li... <http://de.mc1103.mail.yahoo.com/mc/compose?to=Opa...@li...> >> https://lists.sourceforge.net/lists/listinfo/opalvoip-user > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > > -----Inline Attachment Follows----- > > _______________________________________________ > Opalvoip-user mailing list > Opa...@li... > <http://de.mc1103.mail.yahoo.com/mc/compose?to=Opa...@li...> > https://lists.sourceforge.net/lists/listinfo/opalvoip-user > |