David L. West
Guru
- Joined
- Jun 18, 2014
- Messages
- 13
- Reaction score
- 6
I'm trying to develop a "quick conference" routine, because some phones have an easy way to conference and some don't. I want a consistent UI across devices, hence this.
The code should grab all the active channels for a given extension and transfer them all to a MeetMe conference, then join that MeetMe conf itself. Then I'd map that to a feature code so users could just do *88 (or whatever) rather than have to initiate a transfer for each line they have active.
Trying to think it through, I dialed into my Asterisk phone from two outside lines and then looked at core show channels and see this:
a) SIP/inboundtg-000000 s@macro-dial:7 Up Dial(SIP/1000
b) SIP/inboundtg-000000 s@macro-dial:7 Up Dial(SIP/1000
c) SIP/1000-000000d6 s@macro-dial:1 Up AppDial((Outgoing Line))
d) SIP/1000-000000d2 s@macro-dial:1 Up AppDial((Outgoing Line))
Makes sense to me: two channels for each leg of the call. I can use channels() to get the list of channels that have 1000- in them and then use ChannelRedirect() to throw them to a place in the dialplan that'll send them to MeetMe(1000).
But then I realized those last two channels (c & d) are the legs going to my softphone, and the ones I want (a & b) are the other two. So I think what I need is to get the ${BRIDGEPEER} for c & d. The following pseudocode forms in my fevered brain:
cList = ${CHANNELS(1000-)}
for each channel...
MeetMe(1000)
And presto, all parties are in a MeetMe conference. Coding in the AEL always takes me longer than I think it should, so I wanted to run this by somebody before I start hacking on it. Not looking for somebody to do the work, just for somebody to say "yeah, that oughta work" or "are you nuts?".
The code should grab all the active channels for a given extension and transfer them all to a MeetMe conference, then join that MeetMe conf itself. Then I'd map that to a feature code so users could just do *88 (or whatever) rather than have to initiate a transfer for each line they have active.
Trying to think it through, I dialed into my Asterisk phone from two outside lines and then looked at core show channels and see this:
a) SIP/inboundtg-000000 s@macro-dial:7 Up Dial(SIP/1000
b) SIP/inboundtg-000000 s@macro-dial:7 Up Dial(SIP/1000
c) SIP/1000-000000d6 s@macro-dial:1 Up AppDial((Outgoing Line))
d) SIP/1000-000000d2 s@macro-dial:1 Up AppDial((Outgoing Line))
Makes sense to me: two channels for each leg of the call. I can use channels() to get the list of channels that have 1000- in them and then use ChannelRedirect() to throw them to a place in the dialplan that'll send them to MeetMe(1000).
But then I realized those last two channels (c & d) are the legs going to my softphone, and the ones I want (a & b) are the other two. So I think what I need is to get the ${BRIDGEPEER} for c & d. The following pseudocode forms in my fevered brain:
cList = ${CHANNELS(1000-)}
for each channel...
bridgedchannel = importvars(channel.BRIDGEDPEER)
ChannelRedirect(bridgedchannel,meetme(1000))
endMeetMe(1000)
And presto, all parties are in a MeetMe conference. Coding in the AEL always takes me longer than I think it should, so I wanted to run this by somebody before I start hacking on it. Not looking for somebody to do the work, just for somebody to say "yeah, that oughta work" or "are you nuts?".