Link to home
Start Free TrialLog in
Avatar of netcmh
netcmhFlag for United States of America

asked on

Automatic 2 or 3-way conference

Hi all,

I am trying to set up an automatic 3-way conference. Three extensions would form a group, and whenever one of the parties calls the conference number, the other 2 members are automatically called and put into the conference.

Is this even possible? Please help.

Thanks
Avatar of DrDamnit
DrDamnit
Flag of United States of America image

Not possible using the actual dialplan conferencing software MeetMe. If you are an expert PHP programmer, it may be possible using AGI.
Avatar of netcmh

ASKER

No I'm not. If anyone has a solution or a method to get me started, I'd be very appreciative.

Thanks
Let's make sure about what you're trying to do...

* You have an Asterisk PBX with 3 users SIP/100, SIP/101 and SIP/102.
* You'd like that if any of these users dial a particular extension, Asterisk will automatically call the other 2 users, and then put all 3 users into a conference call.

Is that what you are looking for ?
Avatar of asternic
asternic

Here you have a dialplan snippet that will do the trick. It is kind of raw but it does not need AGI scripts.

GROUPCALL variable should contain the extensions that are part of the group
CTX should be set to the context where you can find those extensions
ROOM is the meetme conference number to use




exten => 1720,1,Answer
exten => 1720,n,Set(GROUPCALL=602!606!604)
exten => 1720,n,Set(CTX=from-internal)
exten => 1720,n,Set(ROOM=5000)
; Do not modify below this line
exten => 1720,n,Set(AUTHORIZED=0)
exten => 1720,n,Set(i=1)
exten => 1720,n,While($[${i}<=${FIELDQTY(GROUPCALL,!)}])
exten => 1720,n,Set(CURRENT_EXTEN=${CUT(GROUPCALL,!,${i})})
exten => 1720,n,ExecIf($["${CALLERID(number)}" = "${CURRENT_EXTEN}"],Set,AUTHORIZED=1)
exten => 1720,n,ExecIf($["${CALLERID(number)}" != "${CURRENT_EXTEN}"],Set,OTHERPARTY="${OTHERPARTY}!${CURRENT_EXTEN}")
exten => 1720,n,Set(i=$[${i}+1])
exten => 1720,n,EndWhile
exten => 1720,n,GotoIf($["${AUTHORIZED}" = "1"]?ok)
exten => 1720,n,Noop(Calling Extension is not in Group, Hangup)
exten => 1720,n,Playback(goodbye)
exten => 1720,n,Hangup
exten => 1720,n(ok),Noop(Calling Extension is in Group, continue)
exten => 1720,n,Set(OTHERPARTY=${OTHERPARTY:1}
exten => 1720,n,Set(i=1)
exten => 1720,n,While($[${i}<=${FIELDQTY(OTHERPARTY,!)}])
exten => 1720,n,Set(CURRENT_EXTEN=${CUT(OTHERPARTY,!,${i})})
exten => 1720,n,System(/usr/sbin/asterisk -rx "originate Local/${CURRENT_EXTEN}@${CTX} application Meetme ${ROOM}")
exten => 1720,n,Set(i=$[${i}+1])
exten => 1720,n,EndWhile
exten => 1720,n,Meetme(${ROOM})
exten => 1720,n,Hangup

Open in new window

Avatar of netcmh

ASKER

nauliv: yes, just to let you know however, that these users are physically in 3 different locations

asternic: looks complicated, will go through it.
ASKER CERTIFIED SOLUTION
Avatar of asternic
asternic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of netcmh

ASKER

This would hold true even if the people those extensions are assigned to dial in from different states, right?
If those people have sip accounts registered in your asterisk box, it does not matter where they are located. They appear as local extensions to asterisk.

It they are dialing in from external lines into your system, you can do that too by using their callerids and real phone numbers (not extensions). It should work too providing that you are receiving a proper callerid that is also suitable for being dialed out.

Avatar of netcmh

ASKER

Wonderfully explained. Thank you
Nice script, works very fine!
I have another problem: I need that when one of the extensions leaves the conference all the other ones are automaticalyy hanged up. Is it possible?

Thanks a lot
The only way to have automatically destroyed conferences without using AMI is to use the options for meetme "A" for marking a user, and "x" for destroying the conference when the last marked user exists.

The problem is that you will have to decide what extension is the one that is going to be marked, the dialplan I posted give sthe same meetme call for everyone, you should modify it to pass Ax as meetme options to just one of the extensions, if that extension exists , the conference will be destroyed. So it works only by marking users, not for any of the users.
asternic,
thank you for the quick answer.

This could not be a problem for me, since I'm using the script to submit messages throug SNOM PA1 paging phones, so that there is one actual originator and the PA1 acts as "clients", meaning that they auto-answer to the conference, but they cannot hang up by themseves. As soon as the "originator" leaves the conference all the partecipants must be hanged up.
I mean: I would like to have ext 739 and 763 to be joined to my conf and the conf destroyed when I leave.

Should sound something like this:

exten => 1002,1,Answer
exten => 1002,n,Set(GROUPCALL=733!763!739)
exten => 1002,n,Set(CTX=from-internal)
exten => 1002,n,Set(ROOM=5000)
; Do not modify below this line

exten => 1002,n,System(/usr/sbin/asterisk -rx "originate Local/763@${CTX} application Meetme ${ROOM}")
exten => 1002,n,System(/usr/sbin/asterisk -rx "originate Local/739@${CTX} application Meetme ${ROOM}")
exten => 1002,n,Meetme(${ROOM},Ax)
exten => 1002,n,Hangup

But it doesn't work when I hang up the others remain on the conference
Have not tried myself, but try passing x to the Meetme call in the originate line.
Thanks, that made the trick.

I put x on "silent" participants and xA on originating call ant that works.
Thank you for your help