Reputation: 96
I am using PHP-AGI for asterisk call recording. It provides a method Monitor in class AGI_AsteriskManager. Now I don't want input and output recording separately, I just want one single file containing the complete call record. I used the code below :
...
$agiAsteriskManager = new AGI_AsteriskManager();
$agiAsteriskManager->Monitor($mychannel,$myfile, "wav", true);
...
The last parameter as mentioned in docs is $mix which i guess is either for creating single file ($mix=false) or two separate files ($mix=true) [source].
I have tried both the $mix options but it creates two files in either case. Can anyone help me figure this out ? Where am I going wrong, as I could not find detailed documentation regarding the same?
Upvotes: 0
Views: 2882
Reputation: 188
$agiAsteriskManager->Monitor($mychannel,$myfile, "wav", true);
This will save a the call recording into a single file 1.wav
$agiAsteriskManager->Monitor($mychannel,$myfile, "wav", false);
The above mentioned statement will save the call recording into 2 files. It will save the input and output separately.
'arheops' has rightly mentioned in the previous comment that SOX is required if you want to save the recording into a single file. Installing SOX on the PBX server will solve the issue.
Initially asterisk creates separate in and out files while the call monitoring is on and call is in progress. Once the call monitoring is stopped the two recordings are automatically merged with the help of SOX.
Upvotes: 0
Reputation: 15247
That is normal.
It do create two files, after that convert to one
Dependency: sox package.
Upvotes: 0