Record separated channel in ARI

Hi

I’m trying to do monitor like job in ARI, if I do record in bridge, I got one file with both caller and callee, if I do record on channel, I can’t join the channel into a bridge (got Channel currently recording), so how can I get separated recording files for caller and callee in ARI?

Regards

You would need to use the snoop route[1] to create a snoop channel from each party and then direct each snoop channel to their own record. This allows you to implement your own MixMonitor for example.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-snoopChannel

So I have to create two snoop channels on caller and callee channel, is that more resource consuming compare to monitor? if I want to mix them to one file, do I have timestamp issue?

Underneath it operates very much the same, uses the same underlying stuff. If you want to mix them it should be fine. You could also take one and snoop on both directions and record that to a single file. That would be exactly like MixMonitor.

since I also want to recording early media so every time when I want to make a call,

  1. snoop caller channel, do recording as out for caller
  2. create callee channel
  3. snoop callee channel, do recording as out for callee
  4. snoop callee channel, do recording as both for full recording
  5. dial callee channel, bridge them if connect

then it will have three file generated, seems complicated, for now I’m using monitor and sox them when necessary

As ARI is an API for writing telephony applications that is how it is done. You are writing your own Monitor/MixMonitor, not using an existing implementation. ARI gives the primitives to do what you want.