I wanted to capture all the voice conversation between customer and agent in text format.
I have done the integration with Asterisk and Google Speach-to-Text using UniMRCP. I'm successfully able to capture customer side speech only but I wanted to captured agent's conversation too.
Sample dialplan:
exten => s,1,Answer()
exten => s,2,Originate(SIP/101,exten,google,s,3)
exten => s,3,SpeechCreate()
exten => s,4,SpeechActivateGrammar(builtin:speech/transcribe)
exten => s,5,SpeechBackground(beep, 20)
exten => s,6,Verbose(1, "Recognition result count: ${SPEECH(results)}")
exten => s,7,GotoIf($["${SPEECH(results)}" = "0"]?7:9)
exten => s,8,Playback(error)
exten => s,9,Goto(3)
exten => s,10,Verbose(1, "Recognition result: ${SPEECH_TEXT(0)}, confidence score: ${SPEECH_SCORE(0)}, grammar-uri: ${SPEECH_GRAMMAR(0)}")
exten => s,11,SpeechDestroy()
I want to save both parties communication in a text format need suggestion on dialplan part to achieve the same.
Simplest way - send both parties to conference(see n-way-calling howto) and listen to conference.
You also can use ChanSpy