Is delivering a message to a human or answering machine feasible on Tropo for Webapi? or Hosted? Both? Neither? I read the blog entry on handling answering machines (sort of) on the hosted scripts: http://blog.tropo.com/2010/12/17/human-vs-answering-machine-detection/ Even for hosted scripts, the "solution" in that blog is kind of silly... it does not address the issue of an app knowing WHEN the answering machine is DONE talking so you can leave your message. The ISSUE is getting the message to the human (or answering machine). What can we do with a webapi (or hosted) app? Thanks!
50 comments
-
elaborative I have also found the home-grown CPA approach using the record and maxtimeout to be unsatisfactory. Just wanted to add my voice to the growing chorus asking for legitimate CPA. The problem I find is that there is too much variance in silence during the answering machine recording, and the beep may happen late. This results in half the message being cut off. What we really need is simply a way to detect the beep tone, and if there is a beep any time in the message, to restart playing and switch to "leave a message mode" with no DTMF menu following the message. Is there now a way to do this using the web scripting API? I am a bit confused by the forum thread above. Please let me know! Thanks!
-
Tropo Import Bot msraowhite 9:53 hello i need u r help despertly https://www.tropo.com/bizblog/viewer?bb-tid=1357814 please see this ticket tony voxeoTonyT 9:54 I see the ticket. How can I help? msraowhite 9:55 tell me how can i find start time and end time using josn in webapi i know that starttime attribute and end time attribute is noot available in webapi as it is avaialable in scripting language voxeoTonyT 9:56 ahh, ok so that was what I wanted to know if you were using JSON and not php or ruby libraries. so just to confirm you are using JSON to create your app, correct? msraowhite 9:57 yes exacttly voxeoTonyT 9:58 thx. I'll forward that ticket over to the tropo specialist to see if there are any examples in JSON. Once we have more details I'll have someone update the ticket.
-
Justin Dupree The CPA method referenced in the post right above yours does have some beep detection available: https://github.com/kevinbond/CPA Please review that page and see if it might work better for you than the pure silence detection option. Justin Dupree Voxeo Labs
-
msraowhite we are purely using JSON .
-
manojgeorge100 Hey guys, any update on the human vs answering machine support?
-
Tropo Import Bot Hello, Looks like I included a period (.) at the end of the url. Let's try it again, click here (link: https://www.tropo.com/docs/webapi/web_language_libraries.htm ) to view the webapi libraries. As far as getting an understanding of how the CPA works when detecting human or answering machine take a look at the human VS answering machine doc (link: https://www.tropo.com/docs/webapi/web_language_libraries.htm ) that was posted earlier. It contains an explanation on how CPA determines if the answering party is a human or machine. Regards, Tony Taveras Customer Engineer Voxeo Support
-
jpwspo so the current state for SCRIPT apps is that you can detect if there is an answering machine, but not when it's ready to accept a message. what about webapi apps -- can they do that? if so, how?
-
Tropo Import Bot They have not been able to reproduce the error upon a single instantiation only reproducible with multiple instances. /Users/ttaveras/Downloads/2011-05-18-0200.txt:1747: May 18 02:00:19 GMT 2011 tropo204.orl.voxeo.net TROPO 70654 0 63e02aec30cb4935592d26150e27c686 1 7cb85f225f18fe6129a6e48facd70ee5 ApplicationInstance[http://hosting.tropo.com/70654/www/decision_tree_lead_call.py , sas_2-15-sm1nq5mnqg7olt8tropo] has runtime errors: AttributeError: 'NoneType' object has no attribute 'record' in \n File "
-
Adam Hello, From above, we are suggested that we can use "maxSilence" of "record" function to do the WebAPI CPA. While from this doc http://blog.tropo.com/2010/12/17/human-vs-answering-machine-detection/, we know the "starttime", "endtime" and "difference" are needed to get, and that's easy in Tropo scripting with build-in function(Time.new in the example). But if in WebAPI, it's a little hard to get the start/end time points in JSON in runtime, so it's also hard to do different action based on the "difference" time. Could you please advise ? Above question is from IRC user (msraowhite), and he will monitor it for answer. Thanks! Regards Adam Kong Voxeo Support
-
Justin Dupree Hi David, I think you already opened a separate post on this, but this is what you're referencing: https://github.com/kevinbond/CPA Justin Dupree Voxeo Labs
-
msraowhite i can use "maxSilence" of "record" function to do the WebAPI CPA. While from this doc http://blog.tropo.com/2010/12/17/human-vs-answering-machine-detection/, we know the "starttime", "endtime" and "difference" are needed to get, and that's easy in Tropo scripting with build-in function(Time.new in the example). But if in WebAPI, it's a little hard to get the start/end time points in JSON in runtime, so it's also hard to do different action based on the "difference" time. Could you please advise ? please give me solution .i am using JSON Document. for more info please find this ticket what exactly i want its been 4 days to that ticket since then no reply .i am waiting for your reply https://evolution.voxeo.com/ticket/1358814 please check that link to find what exactly i want .
-
jpwspo You say the scripting and webapi are the same for CPA... however, the webapi docs for 'record' absolutely do NOT mention silenceTimeout as a parameter. (The scripting docs DO mention it) Can someone please confirm if that param is available for webapi (and if so, maybe add it to the docs)? and please also confirm its correct useage silenceTimeout vs silencetimeout vs silence_timeout
-
Bjkdo4ykgdMu First off, to Matt, Andy, Tony, Justin and Adam: It's awesome that you guys take the time to answer all of these questions. Don't let all the complainers get you down! But seriously, when I was checking out Twilio and Tropo, it was your guys' responsiveness in discussion forms that made me want to give Tropo a shot. Ok, to my question... I'm using similar code to the one in that blog post (mine is in Python and it's a hosted script). However, according to the logs, I'm often getting a weird issue on that first instance of calling "record". Here's a random example: May 18 02:00:02 GMT 2011 tropo203.orl.voxeo.net TROPO 70654 0 222bc0af618d823e49a0075a69c9c5ab 1 dc9fd94a024a4eafd4d3d22edfbf5308 [Tropo-Thread-222bc0af618d823e49a0075a69c9c5ab] ApplicationInstance[http://hosting.tropo.com/70654/www/decision_tree_lead_call.py , sas_2-14-smrgw9kzclh3x4tropo] has runtime errors: AttributeError: 'NoneType' object has no attribute 'record' in \n File "
-
Adam [15:52] adam [15:52] i understood [15:53] when [15:53] the "silenceTimeout" is to set the value (3s) [15:53] cal is made [15:53] On connect, it starts the timer. On answer, it records the callee's greeting until 1 second of silence is detected [15:54] but my question is how to calculate time [15:54] difference in WEB API [15:56] okay, I got you. a moment please . [15:56] ok [16:08] adam [16:08] u ther [16:08] ? [16:09] yeah, I am still working on it. [16:09] ok [16:17] Well, I donot think I can find a way immediately regarding how to calculate the time in WebAPI, and for now I think the best way is updating that ticket with your problem and then waitting for response from our Tropo engineer. Sounds good ? [16:18] and also you can keep an eye on it for newest update. [16:18] ok sure ill update [16:18] as a ticket [16:18] but meanwhille [16:18] give me some ideas [16:19] as to how i can implement [16:19] this [16:19] no, I mean updating that ticket instead of a new ticket. do you mind I update it for you with your problem ? [16:20] no [16:20] u can [16:20] do it for me [16:20] ow i can implement what ? calculating the time ? [16:20] how i can implement what ? calculating the time ? [16:20] yes [16:21] If I have an idea, it's no need to update that ticket :) [16:21] once you rise the ticket please [16:21] let me know [16:21] the ticket [16:22] no [16:22] https://evolution.voxeo.com/ticket/1358814 this is the ticket [16:47] @msraowhite, I have updated that ticket with your problem, and now you can monitor that ticket for answer, thanks !
-
Tropo Import Bot Hello, I had our engineers look deeper into this issue and we were not able to duplicate this problem internally. One of our engineers initiated our test app 10 times concurrently without failure and no errors were detected. Can you tell us more about how you are able to reproduce this problem? One of the engineers was looking thru your code and noticed one line that might cause some problems when running this app consecutively: file_name = numberToDial + "_" + str(int(time.time())) + ".mp3" The time.time() function was a concern due to the belief that if two instances just happen to save a file with the same time stamp and if one instance opens up that file to begin the recording the other instance that tries to open up that file would probably gag. If you can try to add some randomness to that file name this might help avoid the error that you're getting. file_name = numberToDial + "_" + str(int(time.time())) +random.randint(0,100)+ ".mp3" Can you give that a shot and let us know how that goes. In the meanwhile we will be standing by for your feedback. Regards, Tony Taveras Customer Engineer Voxeo Support
-
Tropo Import Bot handoff to dyer status 2
-
Bjkdo4ykgdMu Hi Tony, Thanks for looking into it! I'm skeptical that that's causing problems for a few reasons: 1) I'm careful to never call the script on the same number twice in a short period of time (I figured it'd be annoying), so that situation *should* never happen. 2) time.time() returns the number of seconds since the epoch (http://docs.python.org/library/time.html#time.time), so for this to cause a collision issue the script would have to be called twice in 1 second. For now, this script is running on a single thread has to wait for a response code from one call before making another, and this takes about 2 seconds. In other words, I don't think I *could* make 2 calls in 1 second, even if they were to the same #. This is why I didn't already add randomness to the file name. One potential idea (I should've included this before): I think I got an error like this on a test phone that uses google voice. It was early on in my playing around with Tropo so I didn't document it well, but basically the record event was disrupted by the call being forwarded to Google Voice (which surprised me, because I didn't know Tropo would have any idea if/when calls are forwarded). I don't think that perfectly explains what's going on here, but it's the only idea I have left. I'll try adding that randomness to the filename just to be safe (btw, it'd be great if using tropo's FTP was easier: no need to store your credentials in the script, handling file naming for you, etc) and do some more testing firing the script concurrently. Now that I know this is definitely possible I'm more inspired to solve the problem! I'll report back when I have more info. Thanks, -Michael
-
jdyer Hello, Yes, while start and end time are not explicitly available in a JSON runtime you do have this data available to you on the server side, which is rendering your JSON responses, so this should allow you to track the start time of the session, and the incomplete event on a record timeout. We also of course recognize that more advanced answering machine support is an often requested feature, and this is why we are working on ways to make it easier for our developers, be it WebAPI or Scripting, however until that is available you will have to use "creative" solutions, such as these to achieve similar type functionality in your applications. I do hope this helps, and if there are any other questions please don't hesitate to let us know, as our team is most certainly standing by to be of service! Regards, John Dyer Voxeo Labs
-
danyorksmsified Yes, it doesn't sound like the randomness would do anything... in part from what he says here and also what Adam posted in the Tropo chat about filenames not mattering. It really seems like this might be something deeper in the python shim... but that's something that Steven Morgan and others will have to investigate further as I don't have access to that.
-
Tropo Import Bot Hello, When you ask how can you track the start time of a session I'm assuming you're asking how can you programmatically check the value to perform some kind of logic. If yes, then using the ruby example here (link: http://blog.tropo.com/2010/12/17/human-vs-answering-machine-detection/ ) 'time.new' function will save the current time into the 'starttime' variable. You could then use that start time to perform any logic you want. Does this help? If not can you give us an example on how you want to track the start time? Is your webapi using a ruby or php library or are you strictly coding your app in JSON? I'm sure that once we get your answer here we will be better positioned to provide you with further assistance. Regards, Tony Taveras Customer Engineer Voxeo Support
-
Tropo Import Bot Hello Michael. I will need to pass this one on to the engineers so they can play with this some more however considering we are not able to duplicate the same problem it will prove challenging to fix. Can you give us a scenario that works for you when you try to duplicate this problem? Regards, Tony Taveras Customer Engineer Voxeo Support
-
msraowhite my problem is how do i know when user is responding ,how can i know user or machine is responding 4 sec later after silence when i set max-silence parameter as 4. if i know how i can find this i can handle or i have an idea to implement the same on server side i ll write my own logic,to find the time difference. i am using pure JSON. please help me.
-
Justin Dupree Apologies for the extended delay on the response to this ticket, it was mislabeled and therefore lost until an audit located your post. CPA is incoming, and soon, but it's not quite in there yet. Your app appears to be the same general method used in the http://blog.tropo.com/2010/12/17/human-vs-answering-machine-detection/ blogpost, and it can be successful, but what it's essentially missing is beep detection. Beep detection is the best method for answering machine detection, and that's what we're still working on implementing in Tropo. There have been some delays and challenges that have pushed the project back a few times, but it's still a priority. We'll be announcing it on our blog as well as our twitter feed (twitter.com/Tropo) as soon as it's active and functioning. Justin Dupree Voxeo Labs
-
danyorksmsified Tony, I can't see anything wrong with *his* code and, as you note, it seems to be an issue with multiple calls simultaneously. From what I can see in the research I did, the error "AttributeError: 'NoneType' object has no attribute ... " seems to be thrown when a function returns a value of "None" and then potentially a subsequent result. (i.e. it returns multiple values and the first one winds up being "None"). However, his code (as shown here: https://gist.github.com/5c830e959bcc88d258a2 ) doesn't involve any functions that might be returning values... so I'm wondering if this is something down inside the python scripting engine inside of Tropo. Is there some kind of race condition that happens with multiple instances calling record near simultaneously and then causing one of the "record" functions to fail? For instance, he's setting the file_name for a recording using this: file_name = numberToDial + "_" + str(int(time.time())) + ".mp3" Could it be that two simultaneous calls generate the identical file name? And then when one goes to record to it the other one is locked out? If that is the case (and someone on Tropo engineering would need to answer it), perhaps what he can do is to add a "random()" call to the end of it. Dan
-
Justin Dupree There was an infrastructure change that had to be implemented before CPA built into Tropo could be added. This hasn't been an easy change, and has been delayed numerous times as everyone watching for it is well known; I've relayed many times "coming soon" but unfortunately soon has been delayed over and over due to roadblocks. The change we needed is in the next build to be released; CPA is not, but now it can actually be created. I won't saying anything is coming soon at this point, as I have no ETA, beyond that the build with the underlying change should hit the development environment in the next couple weeks. After that, we can start work on built-in CPA. Are you aware of the CCXML workaround we have available? It's working for several of our customers as a "for now" option. If you haven't seen it, I can relay in an independent ticket the method - it tends to have a good bit of back and forth, so it would be better to review out of an already lengthy forum post (any production Tropo customer can use it, however, it's not restricted). Justin Dupree Voxeo Labs
-
Tropo Import Bot Wondering a few things: 1. Is there an update to when Tropo will have CPA integrated? 2. Is there a good solution for detecting when we can leave a message? I implemented this function for Ruby Scripting and wondering if someone could say if this has a chance of working: def amd(options = {}) start_time = Time.new record ".", { :beep => false, :timeout => 10, :silenceTimeout => 1, :maxTime => 10 } end_time = Time.new difference = end_time - start_time if difference < 3 return false else # wait for the answering message to be over record ".", { :beep => false, :timeout => 10, :silenceTimeout => 2, :maxTime => 30 } return true end end The basic idea is to use the same trick and just wait for the message to finish - and once it finishes return true that there was an answer machine detected.
-
Justin Dupree I've received an email in the past pointing me at a solution that involved a SIP transfer for AMD. However, I remember vaguely that there were some significant drawbacks to this approach (only being able to use a subset of voices, for example). Can you point me to this again?
-
davidyang Hi Justin - not to beat the same drum too often, but it's been over a year since "CPA is coming soon" and we're still having problems with answering machine detection in our use cases. It's causing us a lot of problems and we're at the point where we're considering other providers because of this issue. Can we get a final timeline on when Tropo/Voxeo will fix this? I know there are "higher priority" things out there - but a Google search for answering machine detection tropo shows me that there are a lot of people having this problem. At least a roadmap would be helpful. Lots of us developers evangelized for Tropo into our organizations, staking our own professional reputations, on the promise of developer-friendliness and rapid evolution as well as stability and high performance. Don't let us down!
-
jpwspo does that approach work with webapi?
-
Justin Dupree Hi JP, In terms of CPA capabilities, there's no difference between Scripting and WebAPI. Justin Dupree Voxeo Labs