Recording "passing through" E1 traffic

Hello,

maybe some one has done it before:

I’ve got two E1 ports in my asterix box and PABX with one E1, my telco provides me w/ 1 E1 port.

I need to record every single conversation, posiblly without any config on pabx/telco hardware.

It is possible w/ asterisk?

sure it is. Configure the E1 ports to match the current settings, so you can plug telco -> pbx or telco -> asterisk -> pbx and the pbx/telco won’t know the difference.

You will have a handful of channels, say 1-23 + 24 for data on the telco side, and 25-47 + 48 for data on the PBX side. Put channels 1-24 in one context and 25-48 in another context.

Then write a dialplan logic, whereby when a call comes in on a channel, it Monitor()'s the channel, then takes the channel number it came in on, adds (or subtracts) 24, and dials that channel.

asterisk can very flexibly manipulate variables.
For example, ${CHANNEL} for any call will reflect the channel that the call is coming in on. This may be Zap/49. ${CHANNEL:4} will strip off the first 4 characters, leaving you with just 49. So you could do:

exten => s,1,Monitor(options)
exten => s,2,Dial(Zap/$["${CHANNEL:4}" - 24])
This would, for channel 49, dial Zap/25. Thus a call coming in on channel 1 of one PRI (zap/49) goes out on channel 1 of the other PRI (zap/1).

then in the other context, you do
exten => s,1,Monitor(options)
exten => s,2,Dial(Zap/$["${CHANNEL:4}" + 24])
so a call coming in on channel 1 of the other pri (zap/1) goes out on channel 1 of the first pri (zap/49)

does this make sense?

Note that an E1 doesnt have 24 channels (i forget exactly how many). You may also want to view the wiki pages (voip-info.org) asterisk+variables and asterisk+expressions and maybe asterisk+cmd+monitor.

Good luck!

E1–>European standard it’s a 30B+D, T1 is iirc “a 24B+D”.

Thanks for quick reply. Have you tried it before?

have not done this personally,
yeah i knew E1 was different just didn’t know the exact # of channels, change the 24 to 30 and you’ll be set

from one e1
exten => s,1,Monitor(options)
exten => s,2,Dial(Zap/$["${CHANNEL:4}" + 30])

from the other e1
exten => s,1,Monitor(options)
exten => s,2,Dial(Zap/$["${CHANNEL:4}" - 30])