[asterisk-dev] [RFC] Modularising echo cancellers
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Jun 28 15:49:45 MST 2006
On Thu, Jun 29, 2006 at 10:16:31AM +1200, Nic Bellamy wrote:
> Tzafrir Cohen wrote:
>
> >On Wed, Jun 28, 2006 at 03:40:02PM +1200, Nic Bellamy wrote:
> >
> >
> >>Hi all,
> >> I've developed a patch to Zaptel that modularises the software echo
> >>cancelers, allowing multiple ones to be loaded simultaneously.
> >>
> >>
> [snip]
>
> >>The userspace-kernelspace interface required changes to allow sending a
> >>canceler name, rather than just on/off requests, so I added a new IOCTL
> >>interface:
> >>
> >>#define ZT_ECHO_CAN_NAMELEN (16)
> >>typedef struct zt_echocancelv2
> >>
> >>
> >
> >Hmmm... I don't like the name. "v2" for version that will actually be
> >used, and the shorter name for the version not to use.
> >
> >And then again, the echo canceller is an implementation detail. Not a
> >matter of interface. Ideally I would like to be able to switch with ECs
> >through /sys/modules/zaptel/parameters or whatever. Please use sysfs or
> >procfs for such implementation details.
> >
> >Thus you could set them at run-time by a script.
> >
> >The fact that you need to switch an echo canceller indicates that the
> >current echo canceller is simply not good enough. But there should be no
> >real need for Asterisk to set the implementation . For the sysadmin:
> >probably yes.
> >
> >
> The main point about setting them from Asterisk was the ability to set
> them per-channel for experimentation purposes. I guess it could be done
> via procfs/sysfs, but that's going to add quite a bit more complexity
> compared to the ioctl - the ioctl was already there, all I've done is
> expand its capabilities (and yeah, I know many people hate ioctls...).
# ls -l /sys/class/zaptel/zap1
-r--r--r-- 1 root root 4096 2006-06-29 01:39 dev
Zaptel channels are already represented in sysfs. Spans are not
represented there. (If you want to hook to a span, consider adding a write
option to the procfs file of the span).
So what would it take to add there an entry thhat sets the the EC for
that channel?
--
Tzafrir Cohen sip:tzafrir at local.xorcom.com
icq#16849755 iax:tzafrir at local.xorcom.com
+972-50-7952406
tzafrir.cohen at xorcom.com http://www.xorcom.com
More information about the asterisk-dev
mailing list