EvoluxBR / greenswitch

Battle proven FreeSWITCH Event Socket Protocol client implementation with Gevent
Other
126 stars 50 forks source link

Usage with voice capture #46

Closed abnerjacobsen closed 2 years ago

abnerjacobsen commented 5 years ago

I'm not a deep Freeswitch connoisseur but I have a need that this module might solve.

What I need is the following:

1) My Python application dials to a number 2) The moment the receiver answers the connection, it plays a WAV file. 3) After the recording is played expect the recipient to speak something. Capture what it said in WAV format. 4) Play a hold song and pass on to my application the sound captured for processing. 5) The application, having an answer to the recipient, suppresses the music on hold and plays a new WAV file 6) This process can be repeated n times.

Using greenswitch + Freeswitch would it be possible to implement this kind of solution?

Thank you.

italorossi commented 5 years ago

Totally. Check out the samples at https://github.com/EvoluxBR/greenswitch/blob/master/examples/outbound_socket_example.py

We did not write yet the API for the Record app but you can call the command like this:

self.call_command('record', 'path/to/recording')