Mitchell Jackson
2008-Feb-21 02:31 UTC
[asterisk-users] Converence/Meetme with Manager API
Hello! I am having problems figuring out how to do something, and any help would be much appreciated. I would like to use the manager API to take an existing call on a specific SIP extension, dial and conference in a third party. From what I can tell, the way to do this would be to take the two original parties on the call and stick them in a meetme room using Redirect with ExtraChannel, then dial the new party and also dump them into the meetme room. The problem I am having is this: I know the extension of the SIP phone that is on the call, but I don't know it's channel, or the channel of the other party. I need to figure both of these out to be able to use the Manager API and dump those callers into the meetme room. Can anybody tell me how to determine the channels on an active call? Kind Regards, /Mitch
Webmeetme? PaulH On Wed, 2008-02-20 at 20:31 -0600, Mitchell Jackson wrote:> Hello! I am having problems figuring out how to do something, and any > help would be much appreciated. > > I would like to use the manager API to take an existing call on a > specific SIP extension, dial and conference in a third party. > > From what I can tell, the way to do this would be to take the two > original parties on the call and stick them in a meetme room using > Redirect with ExtraChannel, then dial the new party and also dump them > into the meetme room. > > The problem I am having is this: I know the extension of the SIP phone > that is on the call, but I don't know it's channel, or the channel of > the other party. I need to figure both of these out to be able to use > the Manager API and dump those callers into the meetme room. > > Can anybody tell me how to determine the channels on an active call? > > Kind Regards, > > /Mitch > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Mitchell Jackson wrote:> Hello! I am having problems figuring out how to do something, and any > help would be much appreciated. > > I would like to use the manager API to take an existing call on a > specific SIP extension, dial and conference in a third party. > > From what I can tell, the way to do this would be to take the two > original parties on the call and stick them in a meetme room using > Redirect with ExtraChannel, then dial the new party and also dump them > into the meetme room. > > The problem I am having is this: I know the extension of the SIP phone > that is on the call, but I don't know it's channel, or the channel of > the other party. I need to figure both of these out to be able to use > the Manager API and dump those callers into the meetme room. > > Can anybody tell me how to determine the channels on an active call? > > Kind Regards, >You need to track those calls somehow, Mitch. Someone can correct me where I'm wrong, but I see you can do this in a couple of ways. 1. Track the status of peers. My application performs a sippeers manager (and zapshowchannels) command to get the status of each device I'm watching at start up. As events are sent from AMI, I match each device with that event, specifically, the "LINK" event (changed to "Bridge" event in AMI 1.1). This way, when the user goes to click on or drag and drop a device on screen, we already know its information such as its channel info and linked channel information. 2. Another way I can think of would be to use the CLI command "show channels" from AMI and parse the output for your device. After figuring out which one is the device you're interested in, you can use the "Status" manager AMI command to get the info (including linked channel on the device). As you probably figured out, the "Status" command requires the channel of the device and not just its name/ident such as "sip/114" so you have to go through the "Show Channels" hoop first, I imagine. As you say, its the easiest to just "redirect" both parties to an extension already setup in your extensions.conf. I also "push" channel variables from my application to Asterisk channel vars for use in the dialplan. This way I can have a bit of dynamic operations. If my user want to create a new conference by dragging a "live" sip phone to the conference view of my application, I just prompt the user for conference number, send it as a var along with my redirect request to AMI and use dialplan logic from there. As I said, I'm still learning (although learning a lot!) about AMI operations as I build my own application for AMI so take my info with a minuscule portion of sodium. ;) -- Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."