Yahooo, I have finally managed to read data from B channels. The
problem was dst_channel_id that is numbered from 34 for 1st B channel.
Now the last problem is reading D channel data. For now, as temporary
workaround I use libpcap to read packets from visdnX interface. Any
help from Daniele would be very nice. Later I will publish source code
example on how to read B channels directly.

Regards,
Tomas Vilda

Could you please explain in more details on each step. I'm doing as follows

open "/dev/visdn/router-control"
open "/dev/visdn/streamport"
getting streamport channel id using ioctl VISDN_SP_GET_CHANID
creating structure visdn_connect
src_chan_id = streamport channel id

and here STOP...

from where to get dst_chan_id?

because when I do something like this:
    vc.src_chan_id = sp_channel_id;
    vc.dst_chan_id = 1;

    if(ioctl(router_fd, VISDN_IOC_CONNECT, (caddr_t) &vc) < 0) {
        printf("error: %s\n", strerror(errno));
    }

on kern.log I get:

May 18 18:43:08 localhost kernel: [4311677.390000] Channel '000001' is
not an endpoint
May 18 18:43:08 localhost kernel: [4311677.390000] visdn: Connection
between '000410' and '000001' failed: -22

have no idea what to do.. half of the day trying to study chan_visdn sources :(

Regards,
Tomas Vilda
_______________________________________________
Visdn-hackers mailing list
[email protected]
https://mailman.uli.it/mailman/listinfo/visdn-hackers

Reply via email to