[asterisk-dev] Questions regarding a new channel driver
Christian Richter
christian.richter at beronet.com
Tue Jun 20 15:18:13 MST 2006
Earle Clubb wrote:
>Hello all,
>
>I'm in the process of writing a channel driver and there are a couple things
>I don't quite understand.
>
>1) What is the purpose of bridging? I have seen that the SIP driver will
>perform a native bridge when making a call between two SIP devices. Is
>bridging required in my driver if I'll never make a call between two like
>devices?
>
>
as you already found out bridging is meant to transfer the data directly
between to legs of your own driver. You can just not fill the bridging
callback from the tech pointer and it will never be called. This is
safe, i do it in chan_misdn too, when i don't want to bridge.
>2) I have call setup and teardown working for my devices, and I have audio
>flowing from Asterisk to my devices. I'm having difficulty delivering audio
>from my devices to Asterisk. I am not using RTP. I'd like to use the read
>callback specified in the ast_channel_tech structure, but I haven't been
>able to figure out how to get Asterisk to call the read callback. I've
>looked at other drivers, but I'm just not seeing it. Right now I've
>implemented an io context to listen to my audio port in the same way as the
>SIP driver does for its control port. This works, in the sense that my
>driver is able to receive audio packets from my devices. However, when I
>queue up a voice frame via ast_queue_frame(), the frame doesn't appear to
>make it through to the other side of the call (in this case, a SIP device).
>I would prefer to use the read callback, if that's possible.
>
>
>
you need to fill in an fd into the fdset of the channel. whenever the fd
is readable your read-callback will be called. I did this with a pipe in
chan_misdn, but you could use a socket or anything else as well.
Anyway i believe you have an issue in your code, because it is indeed
possible to queue the frames instead of using the read callback... this
results into some warning messages like "tv_fix .. something" but it
works.
>Any help will be appreciated.
>
>Earle
>
>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>asterisk-dev mailing list
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
>
>
More information about the asterisk-dev
mailing list