AW: [Asterisk-Dev] Adding "Bridge" command to manager.c: Implementation Problem

Levent Guendogdu l.guendogdu at feature-it.com
Fri Jun 13 04:26:11 MST 2003


> Create a new thread which has channels C and D, just allocated with
> ast_channel_alloc(1) for example.  Then masquerade A into C and B into D
> and then ast_channel_bridge C and D together and in principle that will
> work, although it might take some tweaking of some sort or another.

This is almost *exactly* what I thought: but:

Since C and D are not bridged before A and B get masqueraded, we'll end
up with this:

- C and D are unconnected.
- Masquerade (A, C) will connect the person A talks to (MOH for example)
to C.
- Masquerade (B, D) will connect the person B talks to (Person F for
example) to D.
- Bridging C and D will result in Person F hearing MOH.

If the bridge would also work on fresh, yet unconnected, channels, we
could have done the following:

- Allocate C and D
- Bridge C and D in a new thread
- Masquerade (C, A) -connect the Person C is talking to to A (which is
D) 
- Masquerade (D, B) -connect the Person D is talking to to B (which is
A, masqed as B)
- Voila, A and B talk.

Problem is: ast_bridge doesn't work on unconnected channels and returns
immediately.

I have almost no teeth left...

Lev.


> Mark
> 
> On Tue, 10 Jun 2003, Jeremy McNamara wrote:
> 
> > Unfortunately it is not that simple.   Levon has spent a lot of time and
> > I have spent some time trying to make this work, but alas we both have
> > failed.
> >
> > Jeremy McNamara
> >
> > Thomas Haeger wrote:
> >
> > >Hallo Levent,
> > >
> > >try it with "ast_channel_bridge".
> > >
> > >You can find a description in channel.h.
> > >
> > >
> > >Regards,
> > >
> > >Thomas.
> > >
> > >-----Ursprüngliche Nachricht-----
> > >Von: asterisk-dev-admin at lists.digium.com
> > >[mailto:asterisk-dev-admin at lists.digium.com]Im Auftrag von Levent
> > >Guendogdu
> > >Gesendet: Montag, 9. Juni 2003 19:49
> > >An: asterisk-dev
> > >Betreff: [Asterisk-Dev] Adding "Bridge" command to manager.c:
> > >Implementation Problem
> > >
> > >
> > >Hi,
> > >
> > >in my effort to implement the "Action: Bridge" to the manager interface
> > >I haven't been able to solve how to actually do the bridge. The skeleton
> > >works, manager implementation is done.
> > >
> > >The "action: bridge" command takes two parameters:
> > >
> > >Channel A and Channel B.
> > >
> > >All I want to do is to connect Channel A to Channel B.
> > >
> > >I tried using ast_channel_masquerade until I've learned, that
> > >
> > >masquerade(a, b) doesn't connect A to B, but it connects the person A
> > >talks to (which is MOH or another Person) to B. What I need is the
> > >ability to connect two active channels together and throw away their
> > >previous endpoints.
> > >
> > >I'm knocking my teeth out on this one for several days now (not many
> > >teeth left...).
> > >
> > >Any help will be GREATLY appreciated.
> > >
> > >Thanks a lot.
> > >
> > >Bye,
> > > Lev.
> > >
> > >
> > >_______________________________________________
> > >Asterisk-Dev mailing list
> > >Asterisk-Dev at lists.digium.com
> > >http://lists.digium.com/mailman/listinfo/asterisk-dev
> > >
> > >_______________________________________________
> > >Asterisk-Dev mailing list
> > >Asterisk-Dev at lists.digium.com
> > >http://lists.digium.com/mailman/listinfo/asterisk-dev
> > >
> > >
> >
> >
> > _______________________________________________
> > Asterisk-Dev mailing list
> > Asterisk-Dev at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-dev
> >
> 
> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list