Tony Mountifield
2005-Apr-27 07:40 UTC
[Asterisk-Users] Redirect two channels to each other?
I've been scratching my head trying to think of a way to do this, but without success yet. I'm using the Manager API. If I have two channels linked to each other (i.e. direct connection), or even if they are independent channels, I can transfer them both to the same extension by using Action: Redirect and using Channel: for one and ExtraChannel: for the other. This is most useful for putting them both in the same Meetme conference. What I want to do is find a way to take two unrelated existing channels (which for the sake of argument might be sitting in MusicOnHold, separate conferences, the same conference or whatever), and link them together into a direct call rather than having them talk via their own Meetme conference. Does anyone have any ideas if this can be done? Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org
On Wednesday 27 April 2005 10:40 am, Tony Mountifield wrote:> I've been scratching my head trying to think of a way to do this, but > without success yet. > > I'm using the Manager API. If I have two channels linked to each other > (i.e. direct connection), or even if they are independent channels, > I can transfer them both to the same extension by using Action: Redirect > and using Channel: for one and ExtraChannel: for the other. This is most > useful for putting them both in the same Meetme conference. > > What I want to do is find a way to take two unrelated existing channels > (which for the sake of argument might be sitting in MusicOnHold, separate > conferences, the same conference or whatever), and link them together > into a direct call rather than having them talk via their own Meetme > conference.I have no ideas, other than Meetme. It sounds like it would involve some direct modification of the * code. Its similar to the pickup code - perhaps start there. Let me know if you find anything - id be intersted in a solution for it as well, i just dont have the time to find a solution. -josiah
Alexander Lopez
2005-Apr-27 08:38 UTC
[Asterisk-Users] Redirect two channels to each other?
As ny 10 year old step-daugher says "I don't get it.." Can't you just do a redirect if you specify the channels, * doesn't care if they are bridged together or not. You may end up with zombie channels if the other leg does not drop, but you could do a soft hangup and take care of that.. Or am I missing something???? -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Tony Mountifield Sent: Wednesday, April 27, 2005 10:41 AM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Redirect two channels to each other? I've been scratching my head trying to think of a way to do this, but without success yet. I'm using the Manager API. If I have two channels linked to each other (i.e. direct connection), or even if they are independent channels, I can transfer them both to the same extension by using Action: Redirect and using Channel: for one and ExtraChannel: for the other. This is most useful for putting them both in the same Meetme conference. What I want to do is find a way to take two unrelated existing channels (which for the sake of argument might be sitting in MusicOnHold, separate conferences, the same conference or whatever), and link them together into a direct call rather than having them talk via their own Meetme conference. Does anyone have any ideas if this can be done? Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Maybe this would best be explained in a diagram: 1). person A <---> music on hold and person B <---> music on hold 2). *some manager API action* 3). person A <---> person B This is what I think he's asking about, how do you take two parties on different conversations and put them together without using a meetme conference? MATT--- -----Original Message----- From: Alexander Lopez [mailto:alex.lopez@opsys.com] Sent: Wednesday, April 27, 2005 11:39 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Redirect two channels to each other? As ny 10 year old step-daugher says "I don't get it.." Can't you just do a redirect if you specify the channels, * doesn't care if they are bridged together or not. You may end up with zombie channels if the other leg does not drop, but you could do a soft hangup and take care of that.. Or am I missing something???? -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Tony Mountifield Sent: Wednesday, April 27, 2005 10:41 AM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Redirect two channels to each other? I've been scratching my head trying to think of a way to do this, but without success yet. I'm using the Manager API. If I have two channels linked to each other (i.e. direct connection), or even if they are independent channels, I can transfer them both to the same extension by using Action: Redirect and using Channel: for one and ExtraChannel: for the other. This is most useful for putting them both in the same Meetme conference. What I want to do is find a way to take two unrelated existing channels (which for the sake of argument might be sitting in MusicOnHold, separate conferences, the same conference or whatever), and link them together into a direct call rather than having them talk via their own Meetme conference. Does anyone have any ideas if this can be done? Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
I haven't looked through the code yet, but no, there is no easy way that I've discovered to be able to do this, although it seems like there should be. All that we really need to be able to do is somehow execute a 'Link' action between two channels that would bridge the two desired channels and unlink whatever those two channels were originally connected to. I'll take a look at the manager API code later this week and see if there's any easy way of patching it to accomplish this. Thanks, MATT--- -----Original Message----- From: tony@softins.clara.co.uk [mailto:tony@softins.clara.co.uk] Sent: Wednesday, April 27, 2005 12:44 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Re: Redirect two channels to each other? In article <DB43F516702AAF4392AA45573F18181901267916@vicimail.vicimarketinggroup.com>, mattf <mattf@vicimarketing.com> wrote:> Maybe this would best be explained in a diagram: > > 1). person A <---> music on hold and person B <---> music onhold> > 2). *some manager API action* > > 3). person A <---> person B > > > This is what I think he's asking about, how do you take two parties on > different conversations and put them together without using a meetme > conference?Thanks Matt, that is exactly what I am asking. I assume you haven't found a way either, otherwise you would have mentioned it! :-) Cheers Tony -- Tony Mountifield Work: tony@softins.co.uk - http://www.softins.co.uk Play: tony@mountifield.org - http://tony.mountifield.org _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
I would suggest opening up a bug on the tracker, if it hasn't been done already, for all of these discussions to be logged to.>From my glancing at the code, I think there would be a little more cleanupinvolved in it than just the ast_bridge_chan function. But either way being part of the Manager this is going to have to be clean enough to pass the Mark test to make it into CVS. Any master Asterisk developers listening out there who would like to tackle this one? MATT--- -----Original Message----- From: Josiah Bryan [mailto:jbryan@productiveconcepts.com] Sent: Thursday, April 28, 2005 1:41 PM To: Nicol?s Gudi?o; Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Redirect two channels to each other? On Thursday 28 April 2005 12:57 pm, Nicol?s Gudi?o wrote:> > It almost sounds like there needs to me a new manager action: > > > > Action: Bridge > > ChannelA: SIP/199testfone-1f3c > > ChannelB: Zap/6-1 > > > > It sounds like the intrinsic functionality for 'bridging' is already > > there in Asterisk (duh!), it just needs to be encapsulated in a manager > > action. > > Yes, we need that action on the manager! (but replace ChannelA and > ChannelB to Channel1 and Channel2 as on the "link" event).Fine by me...but does anybody know the relevant subs in any of the asterisk source that actually does the bridging? I mean, is it possible that its as easy as: 'void ast_bridge_chan( ast_chan * a, ast_chan *b )' and we just need to package it as a manager action? Anybody have any pointers on how to proceed? -josiah -- Josiah Bryan IT Coordinator Productive Concepts, Inc. jbryan@productiveconcepts.com (765) 964-6009, ext. 224 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
This may be somewhat of a cross-post with -dev, but I have Manager Bridge Action working under CVS_HEAD and releases 1.0.6-7. http://bugs.digium.com/view.php?id=4297 MATT--- -----Original Message----- From: Josiah Bryan [mailto:jbryan@productiveconcepts.com] Sent: Wednesday, April 27, 2005 1:53 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Redirect two channels to each other? On Wednesday 27 April 2005 11:38 am, Alexander Lopez wrote:> As ny 10 year old step-daugher says "I don't get it.." > > Can't you just do a redirect if you specify the channels, * doesn't care > if they are bridged together or not. You may end up with zombie > channels if the other leg does not drop, but you could do a soft hangup > and take care of that.. > > > Or am I missing something????I dunno...maybe _im_ missing something.. IIRC (http://www.voip-info.org/wiki-Asterisk+Manager+API+Action+Redirect), Manager action 'Redirect' only takes Channel, ExtraChannel, Exten, Context, and Priority as parameters. Example (transferring existing 2 party call to a meetme room): Action: Redirect Channel: Zap/73-1 ExtraChannel: SIP/199testphone-1f3c Exten: 8600029 Context: default Priority: 1 The problem is that you cant redirect to an existing _channel_. I dont know of any channel 'hack' like there is for Local extensions (e.g. to make an extension look like a channel, use Local/1234@context, etc - is there the inverse of that? Make a channel look like an extension?) It almost sounds like there needs to me a new manager action: Action: Bridge ChannelA: SIP/199testfone-1f3c ChannelB: Zap/6-1 It sounds like the intrinsic functionality for 'bridging' is already there in Asterisk (duh!), it just needs to be encapsulated in a manager action. Any takers? Maybe a bounty is needed...? -josiah -- Josiah Bryan IT Coordinator Productive Concepts, Inc. jbryan@productiveconcepts.com (765) 964-6009, ext. 224 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users