[asterisk-dev] chan_zap questions
Armin Schindler
armin at melware.de
Wed Jul 12 07:57:47 MST 2006
On Wed, 12 Jul 2006, Klaus Darilion wrote:
> Armin Schindler wrote:
> > On Wed, 12 Jul 2006, Klaus Darilion wrote:
> > > Armin Schindler wrote:
> > > > On Wed, 12 Jul 2006, Klaus Darilion wrote:
> > > > > > Maybe an additional subclass
> > > > > > AST_CONTROL_AOC
> > > > > > should be introduced.
> > > > > Thats what I did and it works fine. But ast_indicate_data
> > > > > requires a
> > > > > ast_channel as first parameter. If FACILITY is received on
> > > > > leg2, I
> > > > > have to
> > > > > find out the ast_channel of leg 1 to indicate on the proper
> > > > > channel.
> > > > > Fur this
> > > > > purpose I still use ast_bridged_call. Any other suggestion?
> > > > No, don't use ast_indicate*() directly, just use the normal *read
> > > > function to give this CONTROL frame to asterisk. The asterisk
> > > > code
> > > > (bridge or dial-before-bridge) will forward this CONTROL frame to
> > > > the
> > > > other leg.
> > > Aha, sounds interesting. Can you give me a pointer to the code where
> > > this is
> > > already used? Why should I use *read functions? I would rather think
> > > of *write
> > > functions?
> >
> > Actually it is *read. It is the functon called by Asterisk to *read* a
> > frame from the channel driver -> zt_read() in chan_zap.c
> > I don't know the structure of chan_zap, but I think zap_queue_frame() is
> > used to *give* a frame to Asterisk.
> > chan-capi does the same with local_queue_frame() which then provides this
> > frame in the *read function to asterisk.
>
> Ok. But there is still one problem left - If the bridge is not setup (leg 1
> does not have sent CONNECT yet), the AOC-D must be queued somewhere and as
> soon as leg 1 is connected, a FACILITY message must be generated. Do you know
> such a queue mechanism inside Asterisk?
No, I think this is a task of the channel driver. If Asterisk forwards an
information, which the tech cannot send right now, then the tech should take
necessary actions by itself.
> btw: das chan-capi support AOC?
Not yet. CAPI of course provides the same information, but due to the
missing API/mechanism in Asterisk, it is not implemented yet.
If we have a common API for that, we cann add this to chan-capi as well. I
think the same applies for chan_misdn.
Also, like AOC-*, forwarding other IEs might be interesting too.
Armin
More information about the asterisk-dev
mailing list