Automatically add extension to conference room when the first person joins:

I am using this:

exten => 999,1,Originate(SIP/100,exten,from-internal,999,3)
exten => 999,2,MeetMe(999,xTqMm)
exten => 999,3,MeetMe(999,ATqdMt)
exten => 999,n,Hangup

to automatically add extension 100 as the conference admin when someone dials into the conference room.

The problem is that it creates another call to extension 100 for every person that dials in.

Is there a way to have it add extension 100 only if it is not already in the conference?

(extension 100 happens to be an ATA configured as a streaming audio server capable of 10 channels) There is no way to limit the call paths to the ATA from the ATA side.

Thank you.

Make your first line of your extension to check if 100 is in use, if it is skip the originate application

would you have an example by chance? Thank you.

Not off the top of my head, you need to check the Asterisk docs for the right syntax.

I am thinking something like:

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/DeviceStates_id265377.html

This really doesn’t show how to do the if/then logic that you are talking about. I’m sure it is possible but I have no idea how to use it they way we need to. Maybe someone else on the forum will chime in.

Ok I led you to the fishing pond, guess I gotta put the poll in your hand and bait the hook!

The last section show the extension_state variable that is exposed. You can use this as an object of a conditional branch.

http://www.asterisk.name/conditional-branching.html

Did this get you closer?

exten => 999,1,GotoIf($["${EXTENSION_STATE([email protected])}" = “NOT_INUSE”]?3)
exten => 999,2,GotoIf($["${EXTENSION_STATE([email protected])}" != “NOT_INUSE”]?4)
exten => 999,3,Originate(SIP/103,exten,from-internal,999,5)
exten => 999,4,MeetMe(999,xTqMm)
exten => 999,5,MeetMe(999,ATqdMt)
exten => 999,n,Hangup

Thank you very much…