While making two simultaneous calls from one extension I see the following channels:
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,write_codec,write_rate,secure,hostname,presence_id,presence_data
41b249f8-7a0f-11df-971d-674148912bd7,inbound,2010-06-17 15:52:58,1276779179,sofia/DCext/13.1.861.291|101#13.1.861.291|101,CS_EXECUTE,Dimaa M 1234,101,192.168.1.13,103,bridge,sofia/gateway/My_DC_gw/441,XML,enum,default,PCMU,8000,PCMU,8000ast
41c6b1c2-7a0f-11df-971f-674148912bd7,outbound,2010-06-17 15:52:59,1276779179,sofia/DCext/441,CS_EXCHANGE_MEDIA,Dimaa M 1234,101,192.168.1.13,441,playback,local_stream://moh,XML,enum,default,PCMU,8000,PCMU,8000ast
4c05a792-7a0f-11df-9725-674148912bd7,outbound,2010-06-17 15:53:16,1276779196,sofia/DCext/441,CS_REPORTING,Dimaa M 1234,101,192.168.1.13,441,XML,enum,default,PCMU,8000,PCMU,8000ast,,
5796698e-7a0f-11df-9728-674148912bd7,inbound,2010-06-17 15:53:35,1276779215,sofia/DCext/13.1.861.291|101#13.1.861.291|101,CS_EXECUTE,Dimaa M 1234,101,192.168.1.13,106,echoXML,enum,default,PCMU,8000,PCMU,8000ast,,
4 total.
It seems to me the only common part in these channels is DCext profile name. So if every tenant has its own profile, channels can be filtered by profile.
Channels 1 and 4 can be filtered by domain name, but then channels 2 and 3 wont be visible in any Account.
Probably the same approach should be applied to CDRs for the cases where right now we raise an error:
"Cannot associate this CDR with an account. Did not find either a valid account_id or domain_name channel variable"