On Tue, 8 Dec 2015 09:57:15 -0500
Ben Klang <
bkl...@mojolingo.com> wrote:
> >
> > Il giorno Dec 8, 2015, alle ore 9:23 AM, Johannes Vanderknyff
> > <
johannes.v...@gmail.com> ha scritto:
> >
> > Folks,
> >
> > I've just put together a POC using adhearsion / asterisk / dejavu
> >
> >
https://github.com/javexed/MoTH/ <
https://github.com/javexed/MoTH/>
> >
> > The intent is to get a set of known scripts, fingerprint them, then
> > call a number and validate if you heard what you expected.
> >
> > Let me know what you think
>
> Very cool! Thanks for sharing this. We’ve looked at doing similar
> things in the past, but I don’t think we got this far.
>
> It’s only tangentially related, but I’ll mention SippyCup and SIP
> Treadmill:
http://mojolingo.github.io/sippy_cup/
> <
http://mojolingo.github.io/sippy_cup/>
>
https://github.com/mojolingo/SIPTreadmill
> <
https://github.com/mojolingo/SIPTreadmill>
>
> These tools are more focused on load testing than functional testing
> (you can’t fingerprint the received media, for example), but you may
> find them useful.
We did a trick with SippyCup that made it wait for SIP MESSAGEs instead
of trying to time it around the length of the audio, which is very
awkward and can fall apart if your system comes under load and things
start slowing down.
s.receive_message "name_confirmation"
s.send_digits "1"
s.receive_message "postcode_digits"
s.send_digits "321"
You can send these messages from Adhearsion very easily using the
send_message controller helper. By tagging that method call onto the
Punchblock::Event::InputTimersStarted event of a prompt, SippyCup will
automatically send the DTMF at the right moment. You must use SIP INFO
for the DTMF here.
Waiting for specific messages means you can ensure that your
application is progressing down the path you expect. We found this to
be very reliable. Note that this only works with FreeSWITCH at the
moment.
If you want the test to run a little faster than real time then you can
even set max_time on your outputs to something short like 1 second and
SippyCup will zip through the call very quickly!
Regards,
James