Asterisk Research Project - audio transfer - calls between 2 servers with playback and record functions


#1

Hi there,

I´m new to asterisk and have installed the latest certified version to use in a research project I´m conducting.

I have many .wav files (around 70k of them) I’d like to use as playback files on one side (server A), and I’d like the call to be recorded on the other side (server B). The two servers with be connected by an emulated link (WanEm) where I’ll be testing different levels of packet loss etc to produce some degradations in audio quality for comparison and give me a large dataset to test an AI model Im building.

Im using Asterisks SIP functionality and the EVS codec for asterisk provided by Traud (https://github.com/traud/asterisk-evs ) to test voice quality for audio encoded by EVS. Ive read about asterisks playback functionality and call initiation commands but I was wondering how I could use these to select the codec for the call and also how to record the call at Server Bs end?

Would this be done with a loop and a dialplan? or am I better to make a database and run through my filelist.

I’ve got a decent amount of experience coding but Im not really sure how to do these things in asterisk :sweat:

Any help would be greatly appreciated.

Cheers,
Tommy

Edit: I’m aware I need an API to dial from server1 to server2 and loop and that I’ll need a mySQL db with the list of files to playback on server2, then the record function on server1 to capture the audio played back over the link. Im just unsure how to accomplish this in asterisk.


#2

On the server doing the recording ‘B server’ it should be as simple as using the ‘Record’ application

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Record

Answer the call, Record the call.

I’d configure the codec on both machines in pjsip.conf only enabling the codec(s) I wish to use.